Repository navigation
generated resource routes should allow / - #31224
Conversation
c705be9 to
b283ac1
Compare
Codecov Report
@@ Coverage Diff @@
## master #31224 +/- ##
============================================
+ Coverage 63.41% 63.44% +0.03%
Complexity 18502 18502
============================================
Files 1165 1165
Lines 69409 69410 +1
Branches 1264 1264
============================================
+ Hits 44017 44039 +22
+ Misses 25023 25002 -21
Partials 369 369
Continue to review full report at Codecov.
|
|
@ownclouders rebase |
|
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
|
Automated rebase with GitMate.io was successful! 🎉 |
b283ac1 to
bb8337a
Compare
|
@phil-davis I think this PR supersedes
and is the proper fix for
The tests will work with these changes alone. In the real world we may need
@phil-davis can you test if it this PR really fixes the problem for the provisioning API? |
the provisioning api is not setup as a resource via appframework - ocs has it's own routing ... \o/ |
|
This did not work for me for the Provisioning API "groups with slash in the name" cases. |
|
actually, this PR solves a problem. #31463 tries to do even more (fix provisioning ap). so we should get this in as it at least allows managing all groups from the web ui. |
|
Taking over |
|
I have a concern: apparently you don't need to encode the slashes and it will match. What happens if there are route conflicts ? If it happens that the id is controllable by the user, a user could manipulate the route to make it point at another similar route. Ex:
Is this something we can live with ? @butonic We could agree that route designers need to define their routes in a way that such confusion is not possible. |
|
Second point: do we require the id to be fully encoded ? I wrote unit tests and the matcher also matches if the slashes are not encoded, see 73acdd1#diff-3d3d328fe9bbbd7019bad6ec9ae10dacR109 I'd rather prefer to not match these to avoid the conflict mentioned above. |
|
talked with @tomneedham and he also preferred we not touch the core router due to various risks and favor the other solution #31109 need to examine whether the latter also fixes the same issues like the former |
73acdd1 to
3626e32
Compare
|
Changed expectation for non-encoded slash-containing params to true: the Symfony matcher automatically calls The purpose of RouterTest here is to demonstrate that setting the |
|
@PVince81 nice! should we make the regex in 3626e32#diff-3d3d328fe9bbbd7019bad6ec9ae10dacR90 part of the provider params? that way we can test both: normal routes with |
|
added test for when route disallows slashes |
|
👍 for @PVince81 changes ... but cs wants some newlines removed |
28c5a42 to
7a2c6e9
Compare
|
fiixed the stylzes and rebased |
|
@PVince81 @butonic now what is the workflow/timing for backporting this? And it will wait for after |
|
yes, I'll backport this to stable10 cc @tomneedham |
|
stable10: #31927 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
fixes #31223
fixes #31279
fixes owncloud-archive/user_management#19
incudes bonus test written for a different approach before finding https://symfony.com/doc/current/routing/slash_in_parameter.html