-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to list available routes #23251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
thanks. seems this file was quite old already |
It lists |
bcbb181
to
ef9e35e
Compare
Can be useful for debugging or for setting up firewalls or gateways. Signed-off-by: Vincent Petry <[email protected]> Co-authored-by: Joas Schilling <[email protected]>
Replace "/ocsapp/" with "/ocs/v{version.php}/" in the security:routes output. Signed-off-by: Vincent Petry <[email protected]>
ef9e35e
to
2700d9a
Compare
adjusted and squashed |
|
||
protected function configure(): void { | ||
$this | ||
->setName('security:routes') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this in security
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly because useful to evaluate what routes are available for firewalls/gateways/..., knowing what routes could be accessible
@@ -187,6 +187,7 @@ | |||
$application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); | |||
$application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); | |||
$application->add(new OC\Core\Command\Security\ResetBruteforceAttempts(\OC::$server->getBruteForceThrottler())); | |||
$application->add(\OC::$server->get(OC\Core\Command\Security\ListRoutes::class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is for debugging we should maybe only add it when debud mode is on, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above: an admin can use it to find out what routes are exposed for firewall/gateway/... setup. sometimes there are strict firewalls in place and one needs to know what to add to the "allowed lists"
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 33801: failurecheckersShow full log
mysql8.0-php7.4
|
|
I have the feeling that there is no real use or interest for this feature, so I'll close it |
Can be useful for debugging or for setting up firewalls or gateways.
From owncloud/core#28901 and owncloud/core#28642
Tested manually with
occ security:routes
andocc security:routes -d