Review main Merged

62385[BUGFIX] Avoid applying parameter inflation during route resolving

Oliver Hader CR +2 V +2 Normal +215 −10 updated 11/28/19, 06:06

Commit message

Remaining parameters need to be deflated (prepared and normalized to
strings and fitting into Symfony route length and literal constraints)
during route generation.

However, when resolving a route remaining query parameters have to be
kept as is - explained in more detail in the following examples based
on using enhancer with namespace set to 'app':

* https://example.org/page/route-value/app__value=inject
  + previously assigned `app[value]=inject` -> dirty -> rejected
  + not inflated anymore, kept as `app_value`
* https://example.org/page/route-value/app__other=inject
  + previously assigned `app[other]=inject` -> okay, wrong namespace
  + not inflated anymore, kept as `app__other`
* https://example.org/page/route-value/[32+ characters]=inject
  + arbitrary characters lead to OutOfRangeException -> no valid hash
  + previously `md5('app__@any__value')` assigned `app[@any][value]`
    -> dirty -> rejected
  + not inflated anymore, kept as `md5('app__@any__value')`

Basically the mentioned OutOfRangeException revealed that misbehavior,
hacking `VariableProcessor::resolveHash` would not have solve issues
with (incorrectly) merged query parameters - but would have hidden it.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 6