Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Jan 2015 at 15:08 UTC
Updated:
14 Feb 2015 at 05:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pwolanin commentedadd support
Comment #2
pwolanin commentedComment #3
dawehnerShould we also document entity: ?
out of scope for real
... yeah its important that we don't accidentally generate a routing URL.
Let's point to https://www.drupal.org/node/2409209
Comment #5
pwolanin commentedok, think I fixed those.
Comment #6
tim.plunkettWhy bother adding NULL for scheme if we're going to check empty() anyway?
The Drupal::service() calls for access manager, url generator, unrouted_url_assembler all have protected wrapper methods, can we add one for pathValidator too?
In fact, using Drupal:: implies to me that these new changes don't have unit test coverage.
Why split these onto two lines? it's not THAT long...
Ah, so we do have adjustments for this, but I would much rather avoid using ContainerBuilder and mock the helper.
Comment #7
pwolanin commentedfromUri() is static, so I don't think it makes sense to add a wrapper.
"Why split these onto two lines?" - that was just phpstorm autoformatting. Changed it back.
Comment #8
pwolanin commentedThis is basically done, but will have small conflicts with #2416763: Convert Url::fromUri() base:// scheme to base: so let's postpone until that's committed
Comment #9
kgoel commentedUn-postponed this since https://www.drupal.org/node/2416763 landed in core.
Comment #10
xjmRerolling for
base://.Comment #11
xjmUpdated patch. The provided interdiff shows the changes from HEAD's
Url::fromUri().Comment #12
xjmComment #13
xjmComment #16
wim leerseffulgentsia and I pair-reviewed this, we found the following problems, and fixed them all:
This omits the querystring and fragment, if any.
Both are already absolute URLs, they don't need to be prefixed with a scheme.
The second should be referer.
The other 'destination' querystring occurrences use
user-path:, so this one should too.Adding a @todo to the issue itself doesn't make any sense? :) Removed it.
Comment #17
dawehnerit should be base: and not two ".."
Can we please add a test coverage for this particular bugfix?
Comment #18
wim leersYesCT also provided some additional in-person comment-only nitpicks, which have also been fixed in this reroll.
This reroll adds one test case and other than that only touches comments.
Comment #19
dawehnerIt would be nice to have a testAccessForUnroutedUrls
Comment #20
wim leersDone!
Comment #21
dawehnerThank you!
Comment #22
yesct commentedThere is an addition to the draft change record.
Comment #23
webchickDon't see anything untoward here. Looks like it's cleaning up quite a few places where we were erroneously using base:// in the past. Onward!
Committed and pushed to 8.0.x. Thanks!
Comment #25
webchickDid I stutter? ;)