You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Throw correct errors when attempting to create resource containing invalid characters on a file system #151
Currently the ResourceMapper just slices the tail of an URL and attaches it to the root to create a file path. We still need to add many checks there to make sure everything works as intended and nothing can be abused by external values.
E.g.:
convert escaped characters from URLs when generating a file path. (example issue)
check for invalid characters.
escape characters when going back to an URL.
URLs should get checked by a TargetExtractor, but this doesn't check the slug which we also use to generate URLs so should check again there.
Prevent files outside of the root scope to be accessed by for example having an ../../../etc/passwd slug.
Mostly covered already by #173 . Only thing that is not covered yet is checking if the identifier contains any characters that might be illegal on a file system, so I'm guessing the server will currently still throw 500 errors there. We should just catch those errors and then throw a 400 instead.
changed the title [-]Validate generated URLs and file paths[/-][+]Throw correct errors when attempting to create resource containing invalid characters on a file system[/+]on Oct 5, 2022
Activity
jvherweg commentedon Oct 14, 2020
Mostly covered already by #173 . Only thing that is not covered yet is checking if the identifier contains any characters that might be illegal on a file system, so I'm guessing the server will currently still throw 500 errors there. We should just catch those errors and then throw a 400 instead.
[-]Validate generated URLs and file paths[/-][+]Throw correct errors when attempting to create resource containing invalid characters on a file system[/+]jvherweg commentedon Oct 5, 2022
One way to trigger this (on Windows at least) is with
As mentioned above, this should just throw a 400 with a correct message.
jvherweg commentedon Oct 10, 2023
This was fixed in #1654