Problem/Motivation

I have found that some of the links are given the protocol http://www.drupal.org/. I think to have a secure mode of connection its better if we change it to https://www.drupal.org/.

drumm pointed out in #21 that the remaining occurrences are in tests. And in tests we do need to to http:/.

Steps to reproduce

Proposed resolution

Change drupal.org in tests to example.com to indicate that the domain does not matter.

Remaining tasks

write a patch
review
commit

User interface changes

API changes

Data model changes

Release notes snippet

Comments

bhanuprakashnani created an issue. See original summary.

cilefen’s picture

Project: Drupal core » Drupal.org infrastructure
Version: 8.6.x-dev »
Component: documentation » Other
Assigned: bhanuprakashnani » Unassigned
bhanuprakashnani’s picture

StatusFileSize
new4.48 KB

Created the patch for the above issue. Please review and mention if any more changes are to be made. Thank you.

bhanuprakashnani’s picture

Status: Active » Needs review
cilefen’s picture

Project: Drupal.org infrastructure » Drupal core
Version: » 8.6.x-dev
Component: Other » link.module
josevitalsouto’s picture

StatusFileSize
new2.1 KB
new4.33 KB

Fix for duplicate addresses found in the previous patch.

Status: Needs review » Needs work

The last submitted patch, 6: 2962088-06.patch, failed testing. View results

cilefen’s picture

Why are tests changing in this issue? Some of those are “http” for a reason.

prashant.c’s picture

Status: Needs work » Needs review
StatusFileSize
new3.96 KB
new3.96 KB

@cilefen

Tried to figure out the links which were intentionally http.

Re-submitting the patch with interdiff.

josevitalsouto’s picture

I think it's good to keep the http protocol here, as it's a protocol test:

--- a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
+++ b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
@@ -48,7 +48,6 @@ public function providerValidate() {
     $data = [];
 
     // Test allowed protocols.
-    $data[] = ['http://www.drupal.org', TRUE];
     $data[] = ['https://www.drupal.org', TRUE];
     $data[] = ['magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C', TRUE];

Status: Needs review » Needs work

The last submitted patch, 9: 2962088-9.patch, failed testing. View results

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar
yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
StatusFileSize
new3.21 KB
new791 bytes

Lets see patch passes all tests or not, changes addressed mentioned in comment #10 & attached interdiff also.

yogeshmpawar’s picture

Status: Needs work » Needs review

triggering bots.

Status: Needs review » Needs work

The last submitted patch, 13: interdiff-2962088-9-13.patch, failed testing. View results

yogeshmpawar’s picture

Status: Needs work » Needs review
StatusFileSize
new3.21 KB
new791 bytes

Sorry, my bad was added interdiff as a patch. hope this patch will pass the tests.

The last submitted patch, 13: 2962088-13.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 16: 2962088-16.patch, failed testing. View results

cilefen’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Needs issue summary update

I am not at all sure what bug this issue intends to fix. I am putting it on hold until the issue summary is updated with an explanation of what is broken in the test code that appears in patches posted so far.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

drumm’s picture

Category: Bug report » Task
Priority: Normal » Minor

It looks like all the remaining links to http://www.drupal.org are only in test code, which users do not see or click on. We do need to test http://, in URL generation since the web is far from 100% https.

The protocols of each test should stay the same. It might be best to use example.org for tests, instead of drupal.org, to make it clear that the domain is not relevant.

longwave’s picture

There are two links in system.install that look like they need updating:

147:        'description' => t('The minimum version of Apache needed to run Drupal without mod_rewrite enabled is 2.2.16. See the <a href=":link">enabling clean URLs</a> page for more information on mod_rewrite.', [':link' => 'http://drupal.org/node/15365']),
156:        'description' => t('Your server is capable of using clean URLs, but it is not enabled. Using clean URLs gives an improved user experience and is recommended. <a href=":link">Enable clean URLs</a>', [':link' => 'http://drupal.org/node/15365']),

These seem to redirect to the D7 handbook, so assuming there is a D8 equivalent this probably needs updating too.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

quietone’s picture

Title: Convert http links to https for drupal.org » Convert drupal.org to example.com in tests
Component: link.module » other
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active
Issue tags: -Needs issue summary update

Re #22. There is an issue to fix those the links in system module, #3002983: Convert http links to https at system module. Therefor changing this issue to change the drupal.org links in test to example.com as suggested in #21.

quietone’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new12.57 KB

Divided this into several steps as follows:
$ grep -r http://drupal.org core | egrep Test.*.php | awk -F: '{print $1}' | sort -u | nl
1 core/modules/migrate/tests/src/Kernel/process/DownloadTest.php - Do not change, downloads https://www.drupal.org/favicon.ico
2 core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php - Do not change, uses https://www.drupal.org/favicon.ico
3 core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php - Changed
4 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php - Changed
5 core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php - Do not change, in comment.
6 core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaDeprecationTest.php - Do not change, part of deprecation message
7 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php - Changed
$ grep -r https://drupal.org core | egrep Test.*.php | awk -F: '{print $1}' | sort -u | nl
1 core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php - Changed
2 core/tests/Drupal/KernelTests/Core/Http/LinkRelationsTest.php - Fails if changed.
3 core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php - Do not change, in comment.

grep -r http://www.drupal.org core | egrep Test.*.php | awk -F: '{print $1}' | sort -u | nl
1 core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php - Changed
2 core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php - Changed
3 core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php - TODO
4 core/modules/migrate_drupal/tests/src/Traits/CreateTestContentEntitiesTrait.php - Changed
5 core/modules/views/tests/src/Functional/Handler/FieldWebTest.php - Changed
6 core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php - Changed
7 core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php - Changed

This patch has the above changes.

Stll to do:
Any file listed above that is marked TODO. Changing https://www.drupal.org in tests, if any in an actual test. Most of these will be legitimate use in deprecation or comments.

abhijith s’s picture

StatusFileSize
new111.64 KB

Patch #28 applied cleanly on 9.2.x.

after

quietone’s picture

Component: other » phpunit

Since this is about tests, moving to phpunit.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vikashsoni’s picture

Patch #28 applied successfully in durpal-9.3.x-dev
Thanks for the patch

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new144 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

nikhil_110’s picture

StatusFileSize
new12.53 KB

Re-roll patch #28 for Drupal 10.1.x

rassoni’s picture

Status: Needs work » Needs review
StatusFileSize
new18.86 KB
new5.52 KB

Addressed #37 fixed patch applied failed. #28 comments Found few new files address that accordingly.

grep -r http://drupal.org core | egrep Test\*.php | awk -F: '{print $1}' | sort -u | nl

  • core/modules/link/tests/src/Functional/LinkFieldUITest.php : changed
  • core/tests/Drupal/Tests/Component/Plugin/PluginHelperLegacyTest.php : not change, part of deprecation message

grep -r https://drupal.org core | egrep Test\*.php | awk -F: '{print $1}' | sort -u | nl

  • core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php : not change, test validate url sample
  • core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php : changed
  • core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php : changed
  • core/modules/update/tests/src/Unit/ProjectReleaseTest.php : changed
  • core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php : not change, test validate url sample
  • core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php : changed

grep -r http://www.drupal.org core | egrep Test\*.php | awk -F: '{print $1}' | sort -u | nl

  • core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php - D10 does not exist.
  • core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php : not change, part of deprecation message
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Applied patch and ran greps from #38 and every file not updated seems to be documented in #38 and #28.

Think this is good to go.

  • catch committed a51a50e0 on 10.1.x
    Issue #2962088 by yogeshmpawar, jvsouto, Rassoni, Prashant.c,...

  • catch committed dd5a5b71 on 11.x
    Issue #2962088 by yogeshmpawar, jvsouto, Rassoni, Prashant.c,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.1.x, thanks!

I did wonder briefly about the update module tests which are faking Drupal.org data, but it's still example data and it's easier not to have exceptions.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.