diff --git a/.github/workflows/cs.yml b/.github/workflows/cs.yml index 644b9b117..0f5d9ef56 100644 --- a/.github/workflows/cs.yml +++ b/.github/workflows/cs.yml @@ -13,10 +13,16 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: actionlint: #---------------------------------------------------------------------- name: 'Check GHA workflows' runs-on: ubuntu-latest + permissions: + contents: read # Needed to clone the repo. steps: - name: Checkout code @@ -41,6 +47,8 @@ jobs: phpcs: #---------------------------------------------------------------------- name: 'PHPCS' runs-on: ubuntu-latest + permissions: + contents: read # Needed to clone the repo. steps: - name: Checkout code @@ -51,7 +59,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: - php-version: '7.4' + php-version: 'latest' coverage: none tools: cs2pr diff --git a/.github/workflows/label-merge-conflicts.yml b/.github/workflows/label-merge-conflicts.yml index 9c72ce909..318eb97d5 100644 --- a/.github/workflows/label-merge-conflicts.yml +++ b/.github/workflows/label-merge-conflicts.yml @@ -13,10 +13,16 @@ on: - synchronize - reopened +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: check-prs: runs-on: ubuntu-latest if: github.repository_owner == 'WordPress' + permissions: + pull-requests: write # Needed to add and remove labels on the PR. name: Check PRs for merge conflicts diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 79495867c..470469243 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,9 +13,15 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: lint: #---------------------------------------------------------------------- runs-on: ubuntu-latest + permissions: + contents: read # Needed to clone the repo. strategy: matrix: @@ -38,6 +44,8 @@ jobs: ini-values: error_reporting=-1, display_errors=On, display_startup_errors=On, log_errors_max_len=0 coverage: none tools: cs2pr + env: + fail-fast: true # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies diff --git a/.github/workflows/quicktest.yml b/.github/workflows/quicktest.yml index 5b289e379..c6801091e 100644 --- a/.github/workflows/quicktest.yml +++ b/.github/workflows/quicktest.yml @@ -13,11 +13,17 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: #### QUICK TEST STAGE #### # Runs the tests against select PHP versions for pushes to arbitrary branches. quicktest: runs-on: ubuntu-latest + permissions: + contents: read # Needed to clone the repo. strategy: matrix: @@ -37,6 +43,8 @@ jobs: php-version: ${{ matrix.php }} ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On, log_errors_max_len=0 coverage: none + env: + fail-fast: true # At least one test needs a non-en_US locale to be available, so make sure it is. - name: Install locales diff --git a/.github/workflows/reusable-update-cacert.yml b/.github/workflows/reusable-update-cacert.yml index bcd7b6f15..05c4b0c6e 100644 --- a/.github/workflows/reusable-update-cacert.yml +++ b/.github/workflows/reusable-update-cacert.yml @@ -3,11 +3,19 @@ name: Certificates on: workflow_call: +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: certificate-check: name: "Check for updated certificate bundle" runs-on: ubuntu-latest + permissions: + contents: write # Needed to push commits to a branch in the repo. + pull-requests: write # Needed to create a PR. + steps: - name: Determine branches to use id: branches diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ee2f5a68..2aaf39c5a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,16 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: #### TEST STAGE #### test: runs-on: ubuntu-latest + permissions: + contents: read # Needed to clone the repo. strategy: # Keys: @@ -49,6 +55,8 @@ jobs: ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On, log_errors_max_len=0 coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} tools: cs2pr + env: + fail-fast: true # At least one test needs a non-en_US locale to be available, so make sure it is. - name: Install locales diff --git a/.github/workflows/update-cacert-cron.yml b/.github/workflows/update-cacert-cron.yml index b37d842e0..b263b73a2 100644 --- a/.github/workflows/update-cacert-cron.yml +++ b/.github/workflows/update-cacert-cron.yml @@ -11,9 +11,16 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: certificate-check: # Don't run the cron job on forks. if: ${{ github.event.repository.fork == false }} + permissions: + contents: write # Needed to push commits to a branch in the repo. + pull-requests: write # Needed to create a PR. uses: ./.github/workflows/reusable-update-cacert.yml diff --git a/.github/workflows/update-cacert.yml b/.github/workflows/update-cacert.yml index b3e600923..6439c4fab 100644 --- a/.github/workflows/update-cacert.yml +++ b/.github/workflows/update-cacert.yml @@ -24,6 +24,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + jobs: certificate-check: + permissions: + contents: write # Needed to push commits to a branch in the repo. + pull-requests: write # Needed to create a PR. + uses: ./.github/workflows/reusable-update-cacert.yml diff --git a/.github/workflows/update-website.yml b/.github/workflows/update-website.yml index 232912e68..155255b8b 100644 --- a/.github/workflows/update-website.yml +++ b/.github/workflows/update-website.yml @@ -21,9 +21,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - pull-requests: write - contents: write +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} jobs: prepare: @@ -32,6 +32,9 @@ jobs: if: github.repository == 'WordPress/Requests' runs-on: ubuntu-latest + permissions: + contents: read # Needed to clone the repo. + steps: # By default use the `stable` branch as the published docs should always # reflect the latest release. @@ -89,6 +92,10 @@ jobs: if: github.repository == 'WordPress/Requests' runs-on: ubuntu-latest + permissions: + contents: write # Needed to push commits to a branch in the repo. + pull-requests: write # Needed to create a PR. + steps: # PRs based on the "pull request" event trigger will contain changes from the # current `develop` branch, so should not be published as the website should @@ -193,7 +200,7 @@ jobs: # Test that the site builds correctly. - name: Set up Ruby - uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1.319.0 + uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 with: # Use the version as per https://pages.github.com/versions/. ruby-version: 3.3.4 diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 79f702460..bae62cc1b 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -71,12 +71,6 @@ - - - - @@ -86,7 +80,7 @@ ========================================================================== --> - + - + @@ -133,6 +127,12 @@ + + + + + + @@ -173,7 +173,7 @@ - + diff --git a/CHANGELOG.md b/CHANGELOG.md index d46db21d7..7350c6778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Changelog ========= +2.0.20 +------ + +### Overview of changes +- Update bundled certificates as of 2026-08-13. [#1076] +- General housekeeping. + +[#1076]: https://github.com/WordPress/Requests/pull/1076 + 2.0.19 ------ diff --git a/certificates/cacert.pem b/certificates/cacert.pem index 26ec7f7ba..d228daeed 100644 --- a/certificates/cacert.pem +++ b/certificates/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Thu Jul 16 03:12:01 2026 GMT +## Certificate data from Mozilla as of: Thu Aug 13 03:12:01 2026 GMT ## ## Find updated versions here: https://curl.se/docs/caextract.html ## @@ -16,7 +16,7 @@ ## Configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.33. -## SHA256: e57912808daef7b2b0fa4df2ccf17e47aeaf26c839a38f85c76003ebafd866bd +## SHA256: 81b7f2576333a2e360e673f912d7b0b7a765d836c731003e348a46cac5d37198 ## @@ -37,37 +37,6 @@ FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= -----END CERTIFICATE----- -ePKI Root Certification Authority -================================= ------BEGIN CERTIFICATE----- -MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG -EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg -Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx -MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq -MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs -IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi -lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv -qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX -12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O -WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde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6aC74Or8NpDyJO3inTmOD -BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= ------END CERTIFICATE----- - NetLock Arany (Class Gold) Főtanúsítvány ======================================== -----BEGIN CERTIFICATE----- @@ -585,27 +554,6 @@ vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR 9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== -----END CERTIFICATE----- -Atos TrustedRoot 2011 -===================== ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU -cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 -MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG -A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV -hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr -54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ -DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 -HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR -z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R -l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ -bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB -CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h -k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh -TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 -61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G -3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed ------END CERTIFICATE----- - QuoVadis Root CA 1 G3 ===================== -----BEGIN CERTIFICATE----- @@ -2908,3 +2856,95 @@ CgYIKoZIzj0EAwQDgYsAMIGHAkIBLdqu9S54tma4n7Zwf2Z0z+yOfP7AAXmazlIC58PRDHpty7Ve 7hekm9sEdu4pKeiv+62sUvTXK9Z3hBC9xdIoaDQCQTV2WnXzkoYI9bIeCvZlC9p2x1L/Cx6AcCIw wzPbGO2E14vs7dOoY4G1VnxHx1YwlGhza9IuqbnZLBwpvQy6uWWL -----END CERTIFICATE----- + +SECOM TLS RSA Root CA 2024 +========================== +-----BEGIN CERTIFICATE----- +MIIFmjCCA4KgAwIBAgIJAO6JNNDLgOCyMA0GCSqGSIb3DQEBDAUAMFoxCzAJBgNVBAYTAkpQMSYw +JAYDVQQKEx1TRUNPTSBUcnVzdCBTeXN0ZW1zIENvLiwgTHRkLjEjMCEGA1UEAxMaU0VDT00gVExT +IFJTQSBSb290IENBIDIwMjQwHhcNMjQwMTMxMDUxMTU1WhcNNDkwMTE0MDUxMTU1WjBaMQswCQYD +VQQGEw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gM1kn2yJRwFXHX8zUW9nBLEDWc4wuE8LrlZqhGZM9pJQXGmGzResDJV6JgRBna+j4sA1M7yId +lvL0sAfFXFCTRaWTD4E1V99RLrFzWfTcC+e180hDuNMpqOEo46+lMeW/Wvh7ifOQs+kiK0O2gHxQ +DNxslSavnCs4V7l8HRDJ2La10o70Bo7VLzf1W8MBvv0VTnxB+NjT5qTAbhGFh9Gvp4BaJpmdUf0C +5CEP6dbQlfgxWfzYr69yVT6dPQB+GFEaY03IMY+AcBCs+om1fNxrQXt9zoofMBNFbLhvpNH/JsXW +dGUzfNbO12uswTa5wah8LB18FTQN2/zPHYmvBEoLuyUgZ09VNLJo5YA0kXItVYkLjMe2SixzK4sc +UHv81IK99I91DWx7FwMVKw2xgFp+ZLYB2dnpQQrqwlW64glHUcK2N9BDsnjLSxeZ+UPECh9RxH4W +AcKiZW+cqaKMmhP2WBfR4IcR7NOL32ml11ds87hhV1CZWWFCJAcCidYZz6CZa8exzHojP9SB5RH0 +/v1KdHAisqhSjtJl/UIAHIQ48elOn8wrTdFap4Yb5aHglmMeNx+fAIhDluWVfxTO7H4dTPU+SFVR +MLAh+wwKZfqb94nMeQ== +-----END CERTIFICATE----- + +SECOM TLS ECC Root CA 2024 +========================== +-----BEGIN CERTIFICATE----- +MIICTDCCAdGgAwIBAgIJAIF6LO+PI3pEMAoGCCqGSM49BAMDMFoxCzAJBgNVBAYTAkpQMSYwJAYD +VQQKEx1TRUNPTSBUcnVzdCBTeXN0ZW1zIENvLiwgTHRkLjEjMCEGA1UEAxMaU0VDT00gVExTIEVD +QyBSb290IENBIDIwMjQwHhcNMjQwMTMxMDU1MjM0WhcNNDkwMTE0MDU1MjM0WjBaMQswCQYDVQQG +EwJKUDEmMCQGA1UEChMdU0VDT00gVHJ1c3QgU3lzdGVtcyBDby4sIEx0ZC4xIzAhBgNVBAMTGlNF +Q09NIFRMUyBFQ0MgUm9vdCBDQSAyMDI0MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE7NzFMtu9dzQX +SNC12fabk0+GlC5finB3R7XaZonRUd20aFiWObtuNBCLUZSfk6QXAE55BjEXsXQ/NG8yUqicXjsu +9ksDK3JZBgCwLOVh6+nwJXTvso/dEj/GUYH5mBdoo2MwYTAdBgNVHQ4EFgQUO3YReyl04k4GTFaC +QNAhL3qzydUwHwYDVR0jBBgwFoAUO3YReyl04k4GTFaCQNAhL3qzydUwDgYDVR0PAQH/BAQDAgEG +MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaQAwZgIxAN3ib8fi1pMYtAPjMilB5e5/H+t5 +CL0xPL+cZ5oTTZuSCjpAn1v7F/VAr8bFxQXAowIxAKsBVO1ACFp7skwzPvdv1EUY5a897WGLT4lb ++bjxFAWyl8wDcZJdwGZ/pAHxt1AJ1g== +-----END CERTIFICATE----- + +Telia EC TLS Root CA v3 +======================= +-----BEGIN CERTIFICATE----- +MIICMjCCAbegAwIBAgIPAYvSIlRjTQSLbOVHH9K1MAoGCCqGSM49BAMDMEoxCzAJBgNVBAYTAlNF +MRkwFwYDVQQKDBBUZWxpYSBDb21wYW55IEFCMSAwHgYDVQQDDBdUZWxpYSBFQyBUTFMgUm9vdCBD +QSB2MzAeFw0yMzExMTUwODU1MjZaFw00ODA1MjMxMTAwMDBaMEoxCzAJBgNVBAYTAlNFMRkwFwYD +VQQKDBBUZWxpYSBDb21wYW55IEFCMSAwHgYDVQQDDBdUZWxpYSBFQyBUTFMgUm9vdCBDQSB2MzB2 +MBAGByqGSM49AgEGBSuBBAAiA2IABMHIlhVDLbmFKUpW0iK4dpryT6emYOeS31JPwWnWPmkWRrAk +TbPX40sQfHI9mpR7Rbktu3ngg6W+BBSXSechtMCnBmWXj/EaVlmV5cY1jD2HoTfhBQ3AacpCNMLJ +K4NpZaNjMGEwHwYDVR0jBBgwFoAU1GToQ4g6cy/QGnGCNgtehd7H3kMwHQYDVR0OBBYEFNRk6EOI +OnMv0BpxgjYLXoXex95DMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49 +BAMDA2kAMGYCMQCXAUdS/9bbJ8A1JYaGf/bWt/s7Ta0ot5Ulno8OjSNYRWQIlS4tVWldvTAVA7he +OFgCMQCvKr8+Z2Rn+OBr5UHzlgBObpad1LuwNTRcdNgUJxIWadcki+UBLEi1/AURKV5md2M= +-----END CERTIFICATE----- + +Telia RSA TLS Root CA v3 +======================== +-----BEGIN CERTIFICATE----- +MIIFgjCCA2qgAwIBAgIPAYvSUKtCVSxHWr2h3BrFMA0GCSqGSIb3DQEBDAUAMEsxCzAJBgNVBAYT +AlNFMRkwFwYDVQQKDBBUZWxpYSBDb21wYW55IEFCMSEwHwYDVQQDDBhUZWxpYSBSU0EgVExTIFJv +b3QgQ0EgdjMwHhcNMjMxMTE1MDk0NzQyWhcNNDgwNTIzMTEwMDAwWjBLMQswCQYDVQQGEwJTRTEZ +MBcGA1UECgwQVGVsaWEgQ29tcGFueSBBQjEhMB8GA1UEAwwYVGVsaWEgUlNBIFRMUyBSb290IENB +IHYzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsV89KG19hCf4S1Fvk8D3TyDERhmc +vx8F7Kmb4WATx3ije1id3KHxRE0TKmcNCbAQ57bvHFEYa4hR2l20VjVadExqOW+2ld99MbEiO+jR +VOz+BbxLxJnmGwCqI+BfuTjjVReDxsxjQvjgBsClaO/sm5i70nlZcWGRtIkvWDK3NNkT5RtwXc/O +8NTFVpbUqT6cRjIj3olAblR+lRf4Ffy5o+Q9fabjYn9Z9S4itruElcEFf9Ljk7fwdTycT/rvJW9w +/B3G2a3r0f/zXNOVruIBcqE6pkSospACU2bG42fYKrbM/GWnp7u+p9Frz4jaNwpb4YHuEeS8Brat +NcP8X62jXIvvKHxlsMDJCnb4U8JzFOLsU6mohVY58BdZrvi0Gk9UOuqmgoG6dskHoksjZTlK61D/ +InzmEoA1yAYJFDVysjRxDUOu9cAwANbqmq77WIFL6BpnZgVqPtMfG6wN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x7CI83d23Erw== +-----END CERTIFICATE----- diff --git a/certificates/cacert.pem.sha256 b/certificates/cacert.pem.sha256 index 94fc94a2d..85371bab4 100644 --- a/certificates/cacert.pem.sha256 +++ b/certificates/cacert.pem.sha256 @@ -1 +1 @@ -3ff344e30b9b1ed2971044eabb438a08f2e2245ddb5f8ab1a3ad8b63ab4eaf91 cacert.pem +f66dff1bdf8f96060b8177976f8b7d9254bc89bc4db933d769f7384d28480bc9 cacert.pem diff --git a/composer.json b/composer.json index da9a903fc..737cebd74 100644 --- a/composer.json +++ b/composer.json @@ -48,11 +48,9 @@ }, "require-dev": { "requests/test-server": "dev-main", - "squizlabs/php_codesniffer": "^3.6", "phpcompatibility/php-compatibility": "^10.0.0@dev", - "wp-coding-standards/wpcs": "^2.0", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", + "wp-coding-standards/wpcs": "^3.1", + "php-parallel-lint/php-parallel-lint": "^1.4.0", "php-parallel-lint/php-console-highlighter": "^0.5.0", "yoast/phpunit-polyfills": "^1.1.5" }, diff --git a/library/Requests.php b/library/Requests.php index 14dcba4c0..af9acbd11 100644 --- a/library/Requests.php +++ b/library/Requests.php @@ -53,6 +53,8 @@ class Requests extends WpOrg\Requests\Requests { * * @codeCoverageIgnore * + * @phpcs:disable Universal.NamingConventions.NoReservedKeywordParameterNames.classFound -- Deprecated, so not relevant to change. + * * @param string $class Class name to load */ public static function autoloader($class) { diff --git a/src/Exception/Transport/Curl.php b/src/Exception/Transport/Curl.php index 4c0294d74..1c723c824 100644 --- a/src/Exception/Transport/Curl.php +++ b/src/Exception/Transport/Curl.php @@ -76,5 +76,4 @@ public function __construct($message, $type, $data = null, $code = 0) { public function getReason() { return $this->reason; } - } diff --git a/src/IdnaEncoder.php b/src/IdnaEncoder.php index 9f235527b..15273a2b8 100644 --- a/src/IdnaEncoder.php +++ b/src/IdnaEncoder.php @@ -212,7 +212,7 @@ protected static function utf8_to_codepoints($input) { $character |= ($value & 0x3F) << ($remaining * 6); } - $position--; + --$position; } if (// Non-shortest form sequences are invalid @@ -270,7 +270,7 @@ public static function punycode_encode($input) { // Character is valid ASCII // TODO: this should also check if it's valid for a URL $output .= chr($char); - $h++; + ++$h; // Check if the character is non-ASCII, but below initial n // This never occurs for Punycode, so ignore in coverage @@ -307,7 +307,7 @@ public static function punycode_encode($input) { $c = $codepoints[$num]; // if c < n then increment delta, fail on overflow if ($c < $n) { - $delta++; + ++$delta; } elseif ($c === $n) { // if c == n then begin // let q = delta $q = $delta; @@ -341,12 +341,12 @@ public static function punycode_encode($input) { // let delta = 0 $delta = 0; // increment h - $h++; + ++$h; } // end } // end // increment delta and n - $delta++; - $n++; + ++$delta; + ++$n; } // end return $output; diff --git a/src/Ipv6.php b/src/Ipv6.php index bcdd63649..d9b0a144f 100644 --- a/src/Ipv6.php +++ b/src/Ipv6.php @@ -56,7 +56,7 @@ public static function uncompress($ip) { $c2 = ($ip2 === '') ? -1 : substr_count($ip2, ':'); if (strpos($ip2, '.') !== false) { - $c2++; + ++$c2; } if ($c1 === -1 && $c2 === -1) { diff --git a/src/Requests.php b/src/Requests.php index b9bfa31e0..a9d3b3272 100644 --- a/src/Requests.php +++ b/src/Requests.php @@ -40,7 +40,7 @@ class Requests { * * @var string */ - const VERSION = '2.0.19'; + const VERSION = '2.0.20'; /** * POST method @@ -790,7 +790,7 @@ protected static function parse_response($headers, $url, $req_headers, $req_data $options['type'] = self::GET; } - $options['redirected']++; + ++$options['redirected']; $location = $return->headers['location']; if (strpos($location, 'http://') !== 0 && strpos($location, 'https://') !== 0) { // relative redirect, for compatibility make it absolute diff --git a/src/Response.php b/src/Response.php index 86a0438ba..c1e7eff91 100644 --- a/src/Response.php +++ b/src/Response.php @@ -108,7 +108,7 @@ public function __construct() { */ public function is_redirect() { $code = $this->status_code; - return in_array($code, [300, 301, 302, 303, 307], true) || $code > 307 && $code < 400; + return in_array($code, [300, 301, 302, 303, 307], true) || ($code > 307 && $code < 400); } /** diff --git a/src/Session.php b/src/Session.php index 000d2526d..1e9c4fb7c 100644 --- a/src/Session.php +++ b/src/Session.php @@ -227,7 +227,13 @@ public function patch($url, $headers, $data = [], $options = []) { * @throws \WpOrg\Requests\Exception On invalid URLs (`nonhttp`) */ public function request($url, $headers = [], $data = [], $type = Requests::GET, $options = []) { - $request = $this->merge_request(compact('url', 'headers', 'data', 'options')); + $request = [ + 'url' => $url, + 'headers' => $headers, + 'data' => $data, + 'options' => $options, + ]; + $request = $this->merge_request($request); return Requests::request($request['url'], $request['headers'], $request['data'], $type, $request['options']); } diff --git a/src/Transport/Curl.php b/src/Transport/Curl.php index 49522f5f9..d5640dce2 100644 --- a/src/Transport/Curl.php +++ b/src/Transport/Curl.php @@ -316,7 +316,7 @@ public function request_multiple($requests, $options) { $options['hooks']->dispatch('multiple.request.complete', [&$responses[$key], $key]); } - $completed++; + ++$completed; } } while ($active || $completed < $subrequestcount); diff --git a/tests/AutoloadTest.php b/tests/AutoloadTest.php index 7d8f89003..be12b1f0f 100644 --- a/tests/AutoloadTest.php +++ b/tests/AutoloadTest.php @@ -42,7 +42,7 @@ public function testDeprecationNoticeThrownForOtherOldRequestsClass() { public function testAutoloadOfOldRequestsClassDoesNotThrowAFatalForFinalClass() { define('REQUESTS_SILENCE_PSR0_DEPRECATIONS', true); - $this->assertInstanceOf(FilteredIterator::class, new Requests_utility_filteredIterator([], function() {})); + $this->assertInstanceOf(FilteredIterator::class, new Requests_utility_filteredIterator([], function () {})); } /** diff --git a/tests/HooksTest.php b/tests/HooksTest.php index f64b0f19e..6f00202e2 100644 --- a/tests/HooksTest.php +++ b/tests/HooksTest.php @@ -107,7 +107,7 @@ public function testRegister() { public function testRegisterClosureCallback() { $this->hooks->register( 'hookname', - function($param) { + function () { return true; } ); @@ -254,48 +254,48 @@ public function testDispatchRespectsHookPriority() { // Register multiple callbacks for the same hook with a variation of priorities. $this->hooks->register( 'hook_a', - function(&$text) { + function (&$text) { $text .= "no prio 0\n"; } ); $this->hooks->register( 'hook_a', - function(&$text) { + function (&$text) { $text .= "prio 10-1\n"; }, 10 ); $this->hooks->register( 'hook_a', - function(&$text) { + function (&$text) { $text .= "prio -3\n"; }, -3 ); $this->hooks->register( 'hook_a', - function(&$text) { + function (&$text) { $text .= "prio 5\n"; }, 5 ); $this->hooks->register( 'hook_a', - function(&$text) { + function (&$text) { $text .= "prio 2-1\n"; }, 2 ); $this->hooks->register( 'hook_a', - function(&$text) { + function (&$text) { $text .= "prio 2-2\n"; }, 2 ); $this->hooks->register( 'hook_a', - function(&$text) { + function (&$text) { $text .= "prio 10-2\n"; }, 10 diff --git a/tests/Transport/BaseTestCase.php b/tests/Transport/BaseTestCase.php index 00fd584bd..805d79323 100644 --- a/tests/Transport/BaseTestCase.php +++ b/tests/Transport/BaseTestCase.php @@ -911,8 +911,18 @@ public function testAlternateNameSupport() { * * humanmade.com (owned by Human Made and used with permission) points to * CloudFront, and will fail if SNI isn't sent. + * {@internal Skipped for the time being. The above no longer holds: the host serves the + * same certificate whether SNI is sent or not, so a transport which stopped sending it + * would still pass, and the host has meanwhile started refusing requests outright. + * See https://github.com/WordPress/Requests/issues/1077.} + * */ public function testSNISupport() { + $this->markTestSkipped( + 'This test does not verify SNI support anymore.' + . ' See https://github.com/WordPress/Requests/issues/1077' + ); + if ($this->skip_https) { $this->markTestSkipped('SSL support is not available.'); return; diff --git a/tests/Utility/InputValidatorTest.php b/tests/Utility/InputValidatorTest.php index d465acc5c..018964bdf 100644 --- a/tests/Utility/InputValidatorTest.php +++ b/tests/Utility/InputValidatorTest.php @@ -33,7 +33,7 @@ final class InputValidatorTest extends TestCase { */ public static function tear_down_after_test() { if (isset(self::$curl_handle) && is_resource(self::$curl_handle)) { - // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated + // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated curl_close(self::$curl_handle); }