0
Direct editing token errors are not logged
Source: nextcloud/server#67544 · opened by @susnux
Description
OC\DirectEditing\Manager::edit() catches every Throwable while resolving the token and the editor and returns a plain 404 without logging anything:
An unknown or already used token or an editor that is not registered therefore leaves no trace in nextcloud.log, which makes reports like #61487 (404 on /apps/files/directEditing/{token} from the mobile apps) very hard to diagnose.
_Found by code reading._
Proposal
Log the caught exception (info or debug level, including the editor id but not the token) before returning the NotFoundResponse, and add a unit test in tests/lib/DirectEditing/ManagerTest.php.
OC\DirectEditing\Manager::edit() catches every Throwable while resolving the token and the editor and returns a plain 404 without logging anything:
An unknown or already used token or an editor that is not registered therefore leaves no trace in nextcloud.log, which makes reports like #61487 (404 on /apps/files/directEditing/{token} from the mobile apps) very hard to diagnose.
_Found by code reading._
Proposal
Log the caught exception (info or debug level, including the editor id but not the token) before returning the NotFoundResponse, and add a unit test in tests/lib/DirectEditing/ManagerTest.php.
No pledges yet. Be the first to back this.
Comments
Similar requests
Limit logged HTTP responses size to a reasonable level in case of connection errors
0 votes · 0 comments
Give IPs more trust if they already logged-in previously to the same account
1 vote · 0 comments
Expose templates through direct editing
0 votes · 0 comments
[Meta]: Scoped app passwords: limit a token to selected apps
3 votes · 0 comments
WebAuthn passwordless login should not be subject to two-factor challenge
0 votes · 0 comments
No comments yet.