Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Validierung Link-Adresse Seitentyp Externe Weiterleitung #8652

Closed
Mynyx opened this issue Feb 25, 2017 · 9 comments
Closed

Validierung Link-Adresse Seitentyp Externe Weiterleitung #8652

Mynyx opened this issue Feb 25, 2017 · 9 comments

Comments

@Mynyx
Copy link
Contributor

Mynyx commented Feb 25, 2017

Bei der Validierung der Link-Adresse einer Seite vom Typ Externe Weiterleitung werden Links die mit // beginnen (z. B. //www.google.de) sowie Links die nur auf einen Anker verweisen (z. B. #test) als ungültig zurückgewiesen.

Dabei wird die eingegebene Adresse außerdem gelöscht und die Fehlermeldung Bitte füllen Sie das Feld "Link-Adresse" aus! angezeigt, statt die Eingabe wie üblich zusammen mit einer spezifischen Fehlermeldung anzuzeigen.

@fritzmg
Copy link
Contributor

fritzmg commented Feb 25, 2017

#test not being valid for an external URL is normal.

However you are right that the validation should not simply remove the URL altogether and it should display an appropriate error message.

@Mynyx
Copy link
Contributor Author

Mynyx commented Feb 26, 2017

Unfortunately, it is not possible to specify an anchor for an internal forwarding, it would of course be preferable to add an anchor option there.

@fritzmg
Copy link
Contributor

fritzmg commented Feb 26, 2017

Even if you were able to set an anchor there, it would not work in the front end because of the <base href="…"> (except on the index page). You need to set it to {{env::request}}#test (and this should be possible for the target in an external redirect page).

@aschempp
Copy link
Member

aschempp commented Feb 26, 2017 via email

@KaiserCh
Copy link

Should an URL starting with // be invalid at all? While you cannot enter this notation into the browser bar (will result in file://URL), it seems to work in . Browsers will interpret the // as the protocol currently in use, so its either HTTP or HTTPS.

@aschempp
Copy link
Member

aschempp commented Feb 27, 2017 via email

@Mynyx
Copy link
Contributor Author

Mynyx commented Feb 27, 2017

@KaiserCh I think you mean \\ that is interpreted as file://, because // works fine.

@KaiserCh
Copy link

Not in GNU/Linux, where / is the regular path separator. And since MacOS is an Unix and Android a Linux, both should act the same as my Ubuntu desktop.

@leofeyer leofeyer added this to the 3.5.25 milestone Mar 14, 2017
@leofeyer
Copy link
Member

It is actually the PHP parse_url() function which does not handle the protocol relative URL. Of course, we could work around this issue but since @aschempp already explained that protocol relative URLs are deprecated, I don't think we should.

@leofeyer leofeyer removed the defect label Mar 16, 2017
@leofeyer leofeyer removed this from the 3.5.25 milestone Mar 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants