Handle urldecoding of path components in HyphaRequest? #203
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha#203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When including special characters (in particular / or ?) in a url path component, it can be urlencoded to prevent being interpreted as a path separator or query parameter separator. To make sure that the original characters are used, at some point the value should be urldecoded. Currently, this does not seem to happen, or only for a particular path component (e.g. here).
It would be good to do this decoding globally, for example here.
However, if we do this, then we should make sure to more consistently encode url path components as well. In particular, not doing so could prevent a % from working, since en unencoded % will be viewed as an (probably invalid) urlencoded character.
Apparently urlencoding does not actually allow using a / inside a path component, at least with Apache, since that will deny any requests containing %2f (which seems silly, but is sort of a security measure and sortof a workaround). See https://stackoverflow.com/a/3235361/740048
This probably relates to #274 for the generation / encoding of urls.