Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
steps to reproduce :
- enable local.module, add and enable a new language, say, "french" - no need to actually import a .po file
- configure language negociation to 'Path prefix only' (I did not test the other ones)
- go to any form page, using the fr/ path prefix, say fr/admin/settings/language/overview (really simple form)
- submit the form : you are redirected to admin/settings/language/overview (no fr/)
Comment | File | Size | Author |
---|---|---|---|
#16 | syslog_external.patch | 1.46 KB | chx |
#11 | url_options_external-144634-11.patch | 2.47 KB | chx |
#9 | url_options_external-144634-9.patch | 2.47 KB | chx |
#4 | absolute_rewrite-144634-4.patch | 583 bytes | chx |
#3 | absolute_rewrite-144634-3.patch | 1.02 KB | chx |
Comments
Comment #1
keith.smith CreditAttribution: keith.smith commented(correcting title, I hope)
Comment #2
yched CreditAttribution: yched commentedRight :). "Negociation" is, well, french.
Comment #3
chx CreditAttribution: chx commentedJust because you ask Drupal to slap $base_path onto your Drupal path you surely still want to do language URL rewrites. What you do not want to rewrite is an external URL thrown at url().
Comment #4
chx CreditAttribution: chx commentedTHe second chunk was not needed.
Comment #5
Gábor HojtsyYes, it seems like it was broken to check for the absolute flag, because there people ask url() to output an absolute URL. It does not say, that the actual "path" passed in was "absolute" = external. This surely needs to be tested with combinations of omitted language codes, domain name based setups, path prefix based setups and the like. In principal it looks like, so if testing shows this is finally right, then it is fine with me.
Comment #6
Gábor Hojtsyyched: can you test?
Comment #7
yched CreditAttribution: yched commentedWorks (tested with 'path prefix' negotiation - unable to test 'domain name' negotiation on my localhost :-) )
Comment #8
Dries CreditAttribution: Dries commentedmenu_path_is_external is not particularly fast and calling this for every url() is NOT a good idea. We should add an 'external' flag in addition to the 'absolute' flag. All too often, people think that absolute == external.
Comment #9
chx CreditAttribution: chx commentedRefactored. We already determine whether an URL is external or not, now that is called early and language_url_rewrite checks for that. I marked RTBC as there is no functionality change compared to the previous patch.
Comment #10
Gábor Hojtsy- Is it a good idea to allow bypassing filter_xss_bad_protocol() by providing the external flag from outside? I'd say that this code was there, so we can just use it as an internal check. (For security's shake)
- The first documentation line you added is badly indented.
Comment #11
chx CreditAttribution: chx commentedfxbp is only used for checking. security measures are taken by l in the form of a check_url. Spaces fixed.
Comment #12
Dries CreditAttribution: Dries commentedPatch looks good.
Oddly enough, the OpenID link already used 'external'? Also, should we add an external attribute to the php and syslog_conf links?
Comment #13
chx CreditAttribution: chx commentedcan we do that in a followup patch and get this in? :)
Comment #14
Dries CreditAttribution: Dries commentedI committed this patch, and changed the subject. Thanks for your help, chx.
Comment #15
Gábor HojtsyDries committed the patch.
Comment #16
chx CreditAttribution: chx commentedFollowup patch as agreed above.
Comment #17
Gábor HojtsyGreat, committed.
Comment #18
(not verified) CreditAttribution: commented