Skip to content

Conversation

@RubenVerborgh
Copy link
Contributor

@RubenVerborgh RubenVerborgh 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).

@RubenVerborgh RubenVerborgh 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
@RubenVerborgh RubenVerborgh self-assigned this May 3, 2018
@RubenVerborgh RubenVerborgh requested a review from timbl May 3, 2018 00:24
Copy link
Contributor

@timbl timbl 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

@RubenVerborgh RubenVerborgh merged commit 1551b58 into develop May 3, 2018
@RubenVerborgh RubenVerborgh deleted the fix/mapping-percent-encoded branch May 3, 2018 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Epic priority-high to be used for important issues and pull requests that need to be addressed soon ready for review security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants