Not all relative paths are filtered #16

Closed
opened 2020-06-13 14:52:32 -04:00 by tobias · 4 comments
Contributor

a URL ending in .. is resolved; thus one can list the directory the document root is in. Access is denied since ../ is filtered.

a URL ending in `..` is resolved; thus one can list the directory the document root is in. Access is denied since `../` is filtered.
Owner

Hecko, thanks for finding this. I think your comment on #17 is supposed to be on this one...

Hecko, thanks for finding this. I think your comment on #17 is supposed to be on this one...
Author
Contributor

Jup, the comment was intended to go here. Besides fixing this, I was also thinking whether following symlinks is needed. Otherwise one could restrict access also with realpath to be within the document root.
Thanks to this bug is was able to verify that the systemd sandboxing is working (#15)

Jup, the comment was intended to go here. Besides fixing this, I was also thinking whether following symlinks is needed. Otherwise one could restrict access also with realpath to be within the document root. Thanks to this bug is was able to verify that the systemd sandboxing is working (#15)
Owner

I think we do not want to follow symlinks, IMO. I was just about to go look up how to canonicalize paths. I've temporarily pushed a super crappy quick fix, but I think your suggestion should be the real fix.

I think we do not want to follow symlinks, IMO. I was just about to go look up how to canonicalize paths. I've temporarily pushed a super crappy quick fix, but I think your suggestion should be the real fix.
Author
Contributor

Thank you

Thank you
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jmcbray/germinal#16
No description provided.