Problem/Motivation
Part of #3399840: [meta] Replace http urls with https urls of the respective sites in core
Unless specifically testing the 'http' protocol https should be used for URLs.
Steps to reproduce
git grep www.w3.org
Proposed resolution
Change 'http' to 'https' for www.w3.org. The xmnls in the svg files should not be changed, https://www.w3.org/2000/svg is an identifier, not a url, and it should not be https.
Remaining tasks
Changes should be made with a script. Something like
git grep -l http://test.com | xargs sed -i 's#http://test.com#https://test.com#g'. Post the commands used.
Run core/scripts/dev/commit-code-check.sh locally
Create MR
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3569459
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #6
ben280398 commentedFirst, searched for all files containing http://www.w3.org:
git grep -l "http://www.w3.org" | head -50
This returned ~50+ files, mostly SVG files and some CKEditor vendor JS.
Then filtered out the xmlns declarations (which are identifiers, not URLs, and should stay as http):
git grep "http://www.w3.org" | grep -v "xmlns" | grep -v "2000/svg"
```
Result:
```
core/modules/link/src/AttributeXss.php: // @see http://www.w3.org/TR/html4/index/attributes.html
Binary file (standard input) matches
The binary file match is minified CKEditor JS (vendor files, not to be touched). Only one actual source file needed updating.
Fix applied:
sed -i 's#http://www.w3.org/TR/#https://www.w3.org/TR/#g' core/modules/link/src/AttributeXss.php
Verification:
Ran core/scripts/dev/commit-code-check.sh - all checks passed.
Merge Request is linked here for ease of tracking:
https://git.drupalcode.org/project/drupal/-/merge_requests/14611
Comment #7
sivaji_ganesh_jojodae commentedMarking the issue as Needs Work since the pipeline is currently failing.
Comment #8
quietone commented@sivaji_ganesh_jojodae, not all pipeline test failures are due to the changes in the MR. We have some tests, mostly functional javascript ones, that cause random failures. Also, the change in this MR is to a comment and won't be causing a test failure.
Comment #9
dcam commentedThank you all for your work on this issue!
I searched core for more instances of
http:\/\/(www\.)?w3\.org. The only remaining results are from XML namespace (xmlns) attributes, which as noted in the issue summary should not be changed. This one looks good to me.Comment #10
quietone commentedAssigning to myself to possible commit in 24 hours, it is too late in the day for me to do a proper review.
Comment #13
thirteenthdown commentedI have updated all occurrences of http://www.w3.org to https://www.w3.org across the codebase. As instructed, I explicitly excluded the vendor/ and node_modules/ directories because those are external dependencies. I also reviewed the test files and confirmed none of them contain hardcoded http tests that would be broken by this change.
Comment #14
thirteenthdown commentedComment #15
quietone commented@thirteenthdown, Welcome to Drupal! Please read my comment on another issue you have commented on.
Comment #18
quietone commentedI am now going to hide the latest, duplicate MR, close it and restore the status of this which was set by a core subsystem maintainer.
Comment #19
quietone commented@ben280398, thanks for commenting all the actions you made to complete this issue. That is a good practice that is welcome on issues in Drupal.
I applied the diff and did my own searching. I also didn't find any other instances to change. Since there is only 1 change here maybe the scope is wrong and this could have been combined with other small changes sets about changing http. But we are here now so lets get this in.
Comment #22
quietone commentedCommitted and pushed to main and 11.x.
Thanks!