netgen / ezpublish-kernel

eZ Publish API and kernel. This is the heart of eZ Publish 5. This is a v2014.11 kernel, maintained for bugfixes by Netgen.
https://netgen.io
Other
8 stars 18 forks source link

Fix legacy siteaccess mapper when URIs have UTF8 encoded chars #56

Closed xserna closed 7 years ago

xserna commented 7 years ago

Due to fix on EZP-25171, the full semanticPathinfo (including both base URI and viewParameters) is stored "rawurldecoded", but Pathinfo on $request remains untouched (urlencoded). When comparing encoded pathinfo with decoded semanticPathinfo, some bad parts are incorrectly added on siteaccess URI array. Decoding 'pathinfo' before comparing to already decoded 'semanticPathinfo' solves the problem.

emodric commented 7 years ago

ping @blankse What do you think? You're the author of the PR @xserna linked :)

This patch is not in the legacy bridge either, how does it work there?

xserna commented 7 years ago

Hi @emodric after your comment I've reviewed the LegacyBridge, there the decode is already implemented. I've update this PR to implement here the same way as on LegacyBridge (excluding viewParametersString from decode)

blankse commented 7 years ago

LGTM +1 Here the Commit from LegacyBridge: https://github.com/ezsystems/LegacyBridge/commit/afd59b7740653a60eacd52acf20cd584c8d5154c

emodric commented 7 years ago

@xserna Would you add the tests from the commit @blankse linked too?

After that, I'm merging :)

xserna commented 7 years ago

@emodric sure, I'll try to do it ASAP.

xserna commented 7 years ago

@emodric you can check the tests are now added :-)

emodric commented 7 years ago

Thanks @xserna :)