title: Symfony access control allowing urlencoded slash in route name
body: <p>I'm using symfony 3.4. I have a route in my security.yml file, more specifically in <code>access_control</code> key. The route goes something like this: </p>
  
  <pre><code>- { path: '^/route/subroute/SOME_TOKEN', roles: [ SOME_ROLE ] }
  </code></pre>
  
  <p>The <code>SOME_TOKEN</code> is a urlencoded string that may or may not contain  forward slashes in addition to an unknown number of other characters.</p>
  
  <p>Judging by what the docs say <a href="https://symfony.com/doc/3.4/routing/slash_in_parameter.html#routing-slash-in-parameter" rel="nofollow noreferrer">here</a> my route should look something like this:</p>
  
  <pre><code>- { path: '^/route/subroute/.+', roles: [ SOME_ROLE ] }
  </code></pre>
  
  <p>It gives me <code>404: Route not found.</code>. Do note that I'm using Apache2 with <code>AllowEncodedSlashes</code> option enabled.</p>
  
  <p>My guess is that I simply don't know how to write the regex properly. Since I'm bad at regex too, that doesn't come as much of a surprise to me.</p>
  
  <p>I've tried different variations of that. For example <code>(.+)</code>, <code>[.+]</code> etc.</p>
  
  <pre><code># bin/console --env=dev debug:router | grep "/customer/unsubscribe/anon/"
    customer_communication_preferences_unsubscribe_anon           ANY        https    ANY    /customer/unsubscribe/anon/{hash}
  </code></pre>
  
  <p>Route definition:</p>
  
  <pre><code>customer_communication_preferences_unsubscribe_anon:
      path: /customer/unsubscribe/anon/{hash}
      defaults: { _controller: PizokelCustomerBundle:Communication:unsubscribeAnonCustomer }
      schemes: ['%routing.scheme.my_account%']
  </code></pre>