70913[TASK] Add a PathUtility method to check for host-absolute URLs
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Markus Klein +1
- Oliver Hader +1
-
Verified V +2 Done
- Benni Mack +2
- Markus Klein +1
- core-ci +1 CI
Issues 1
Files 9
- typo3/sysext/backend/Classes/Resource/PublicUrlPrefixer.php+2 −1
- typo3/sysext/backend/Classes/Template/ModuleTemplate.php+1 −1
- typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php+1 −1
- typo3/sysext/core/Classes/LinkHandling/LinkService.php+2 −2
- typo3/sysext/core/Classes/Log/Writer/FileWriter.php+1 −1
- typo3/sysext/core/Classes/Page/AssetRenderer.php+1 −1
- typo3/sysext/core/Classes/Utility/PathUtility.php+19 −1
- typo3/sysext/core/Tests/Unit/Utility/PathUtilityTest.php5+28 −0
- typo3/sysext/redirects/Classes/Evaluation/SourceHost.php+4 −1
Review log 2632
Show 47 earlier messages
-
Helmut Hummel uploaded patch set 1 09/06/21, 13:17
-
core-ci voted on patch set 1 V -1 09/06/21, 13:39 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16323
-
Markus Klein uploaded patch set 2 09/06/21, 14:24
-
core-ci voted on patch set 2 V -1 09/06/21, 14:40 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16329
-
Markus Klein uploaded patch set 3 09/06/21, 14:56
-
core-ci voted on patch set 3 V +1 09/06/21, 15:12 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16332
-
Markus Klein voted on patch set 3 V +1 CR +1 09/06/21, 15:12
-
Markus Klein updated the commit message in patch set 4 09/06/21, 15:13
-
Markus Klein voted on patch set 4 V +1 CR +1 09/06/21, 15:13
-
core-ci voted on patch set 4 V +1 09/06/21, 15:29 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16333
-
Mathias Brodala commented on patch set 4 09/06/21, 15:35
-
Markus Klein commented on patch set 4 09/06/21, 15:40
HttpUtility.php:108ReplyAny idea where else to put this, besides creating a new utitility? -
Mathias Brodala commented on patch set 4 09/06/21, 15:46
HttpUtility.php:108ReplyNot many options here. Using "TYPO3\CMS\Core\Http\Uri" would be a bit too much and not be as clear. So ATM a new utility class would make sense. -
Oliver Hader commented on patch set 4 09/07/21, 09:08
Can you please (briefly) describe in the commit message, why this is necessary? ThxHttpUtilityTest.php:161Probably those would should be `false` then, correct? * `/example.com/demo.html` * `example.com/demo.html` * `demo.html` What about ports, user, fragment? * `http://example.com:8080/demo.html` * `https://user:pass@example.com/demo.html` * `https://example.com/demo.html#fragment` -
Markus Klein commented on patch set 4 09/07/21, 10:40
Reply
Will do, once Mathias' comment is resolvedHttpUtility.php:108ReplyOkay, please decide that in the Core team, if we really want a new Utility for this line of code?!?!HttpUtilityTest.php:161ReplyCorrect. ports, fragements, etc do not matter for this method. -
Mathias Brodala commented on patch set 4 09/07/21, 10:47
HttpUtility.php:108ReplyI'm not with the Core team and don't think we need to consult many people about this. If we mark this method as @internal we should be free to move it around later if we find a more suitable location. -
Helmut Hummel commented on patch set 4 09/07/21, 10:57
HttpUtility.php:108ReplyInterestingly, I initially put this method in PathUtility, as it is mostly used in a context where a given path is checked whether it looks like an url. And with the discussion here, I tend to put it back there and name it resemblesurl https://review.typo3.org/c/Packages/TYPO3.CMS/+/70839/5/typo3/sysext/core/Classes/Utility/PathUtility.php#26 -
Markus Klein uploaded patch set 5 09/07/21, 11:13
-
Markus Klein commented on patch set 5 09/07/21, 11:14
HttpUtility.php:108ReplyDoneHttpUtilityTest.php:161ReplyDone -
Mathias Brodala commented on patch set 5 09/07/21, 11:18
PathUtilityTest.php:568Can we add "f:/example.com/demo.html" as another example? Also maybe one version with backslashes since this is about file paths. Better be explicit about things we definitely don't want to accept here. -
core-ci voted on patch set 5 V -1 09/07/21, 11:18 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16374
-
Markus Klein commented on patch set 5 09/07/21, 11:23
PathUtilityTest.php:568ReplyDone -
Markus Klein uploaded patch set 6 09/07/21, 11:23
-
core-ci voted on patch set 6 V +1 09/07/21, 11:40 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16375
-
Markus Klein voted on patch set 6 V +1 CR +1 09/07/21, 12:28
-
Benni Mack commented on patch set 6 V +2 CR +2 09/07/21, 18:59
Hope the change is OK with you now @mbrodala -
Benni Mack merged patch set 7 09/07/21, 18:59
-
Simon Schaufelberger commented on patch set 7 09/08/21, 01:24
PathUtilityTest.php:564This line is identical with the line above and nobody noticed 😄 -
Mathias Brodala commented on patch set 7 09/08/21, 06:52
Reply
Yes. :-) -
Oliver Hader voted on patch set 7 CR +1 09/08/21, 07:03
-
Markus Klein commented on patch set 7 09/08/21, 07:28
PathUtilityTest.php:564ReplyCtrl+D in phpstorm for the lines, when I created them :-D Better test twice... better safe than sorry... <insert any slogan here> -
Simon Schaufelberger commented on patch set 7 09/14/21, 17:33
Created followup Patch: https://forge.typo3.org/issues/95215PathUtilityTest.php:564ReplyDone
HttpUtility.php:108