Skip to content

Conversation

@RubenVerborgh
Copy link
Contributor

@RubenVerborghRubenVerborgh commented May 3, 2018

In #656, we found that looking up .acl files breaks when the path contains spaces. The root cause is that the translation code from URLs to filenames is duplicated all over the codebase, and sometimes implemented incorrectly—as apparently was the case for ACLs.

This pull request does the following:

  • It introduces a LegacyResourceMapper, which implements the URL to filename mapping that is currently used in v4.x, and now incorporates an URL encoding fix.
  • I have wired up this mapper into the faulty .acl lookup component, such that it now properly decodes percent escapes.

The LegacyResourceMapper extends the new ResourceMapper introduced in #643, which captures the future URL to filename mapping. This new mapper has not been wired up yet, since it breaks compatibility and needs to be part of the 5.x release.

In the future, we want to wire up this LegacyResourceMapper to get rid of the error-prone inline mapping code (#661), which will allow us to transition easily to the new ResourceMapper (#662).

@RubenVerborghRubenVerborgh added bug priority-high to be used for important issues and pull requests that need to be addressed soon ready for review Epic security labels May 3, 2018
@RubenVerborghRubenVerborgh self-assigned this May 3, 2018
@RubenVerborghRubenVerborgh requested a review from timblMay 3, 2018 00:24
Copy link
Contributor

@timbltimbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and seems to work for me

@RubenVerborghRubenVerborgh merged commit 1551b58 into developMay 3, 2018
@RubenVerborghRubenVerborgh deleted the fix/mapping-percent-encoded branch May 3, 2018 18:07
@RubenVerborghRubenVerborgh mentioned this pull request Nov 19, 2018
10 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugEpicpriority-highto be used for important issues and pull requests that need to be addressed soonready for reviewsecurity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@RubenVerborgh@timbl