Page MenuHomeSoftware Heritage

utils: Fix unquoted SWHID URLs generated by get_swhids_info
ClosedPublic

Authored by anlambert on Dec 12 2022, 5:18 PM.

Details

Summary

As a SWHID with qualifiers might have some percent encoded characters (like ;
which is used as separator between qualifiers) and HTTP servers will unquote
received URL arguments, a SWHID must also be percent encoded when used as an
URL argument.

This prevent HTTP errors when trying to browse such SWHIDs as previously the
unquoting performed by HTTP servers would remove percent encoding of qualifiers
and thus break escaping of ; used ad separation character.

Diff Detail

Repository
rDWAPPS Web applications
Branch
fix-swhid-url-quoting
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 33221
Build 52088: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 52087: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8955 (id=32263)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/52/ for more details.

This revision is now accepted and ready to land.Dec 13 2022, 12:09 PM

Add commit also quoting SWHID URLs in iframe views;

Build is green

Patch application report for D8955 (id=32265)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/53/ for more details.

Add commit upgrading assets before tagging

Build has FAILED

Patch application report for D8955 (id=32283)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit 0bdc31545ed7932e2ff6100089b1053877f34d73
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 14:12:10 2022 +0100

    package.json: Upgrade dependencies

commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/54/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/54/console

Build was aborted

Patch application report for D8955 (id=32284)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit fa56e49a337c85ff97e38d2fd6f4dcab68401157
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 14:12:10 2022 +0100

    package.json: Upgrade dependencies

commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/56/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/56/console

Build was aborted

Patch application report for D8955 (id=32283)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit 0bdc31545ed7932e2ff6100089b1053877f34d73
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 14:12:10 2022 +0100

    package.json: Upgrade dependencies

commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/55/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/55/console

Build was aborted

Patch application report for D8955 (id=32284)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit fa56e49a337c85ff97e38d2fd6f4dcab68401157
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 14:12:10 2022 +0100

    package.json: Upgrade dependencies

commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/57/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/57/console

Remove cypress upgrade to 12.x, cy2 does not handle it well yet for parallel builds

Build has FAILED

Patch application report for D8955 (id=32285)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit dc7a826d5957baef6569c9ea6e448cfd586f2d0a
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 14:12:10 2022 +0100

    package.json: Upgrade dependencies

commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/58/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/58/console

Build has FAILED

Patch application report for D8955 (id=32286)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit d6a6c484d289d52a0db7051c8dd4f74c85b9dd7c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 14:12:10 2022 +0100

    package.json: Upgrade dependencies

commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/59/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/59/console

Add commit fixing a flaky cypress test

Build is green

Patch application report for D8955 (id=32287)

Rebasing onto 0c4ed91a29...

Current branch diff-target is up to date.
Changes applied before test
commit 415867e6021ef2a9c80f655f91e39cf411541931
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 15:29:19 2022 +0100

    cypress: Fix flaky test

commit d6a6c484d289d52a0db7051c8dd4f74c85b9dd7c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Dec 15 14:12:10 2022 +0100

    package.json: Upgrade dependencies

commit 62e965a34229bf96739000b1a62de52e947e04ac
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Dec 13 10:33:57 2022 +0100

    browse/iframe: Fix unquoted SWHID URLs in iframe views

commit 473583b6ce5be87722b3d57bf23cf1572b71a5ab
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 12 17:11:15 2022 +0100

    utils: Fix unquoted SWHID URLs generated by get_swhids_info
    
    As a SWHID with qualifiers might have some percent encoded characters (like ;
    which is used as separator between qualifiers) and HTTP servers will unquote
    received URL arguments, a SWHID must also be percent encoded when used as an
    URL argument.
    
    This prevent HTTP errors when trying to browse such SWHIDs as previously the
    unquoting performed by HTTP servers would remove percent encoding of qualifiers
    and thus break escaping of ; used ad separation character.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/60/ for more details.