Page MenuHomeSoftware Heritage

SWHIDs: Fix URLs escaping when a qualifier contains escaped chars
ClosedPublic

Authored by anlambert on Sep 24 2020, 5:39 PM.

Details

Summary

When a SWHID qualifier contains special characters like '=' or ';', it
must be escaped in order for the SWHID to be properly parsed afterwards.

When using such a SWHID as part of an URL argument, it must also be escaped
for special characters in order for a browser to resolve the proper URL.

That commit fixes invalid unescaped URLs that were previously inserted in
some webapp pages (leading to 400 errors).

Closes T2641

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D4035 (id=14239)

Rebasing onto ef0f7ae0e7...

Current branch diff-target is up to date.
Changes applied before test
commit 8aec3d5f9cda1541b9d8e74de5c39ee0c2db55eb
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Sep 24 12:38:01 2020 +0200

    SWHIDs: Fix URLs escaping when a qualifier contains escaped chars
    
    When a SWHID qualifier contains special characters like '=' or ';', it
    must be escaped in order for the SWHID to be properly parsed afterwards.
    
    When using such a SWHID as part of an URL argument, it must also be escaped
    for special characters in order for a browser to resolve the proper URL.
    
    That commit fixes invalid unescaped URLs that were previously inserted in
    some webapp pages (leading to 400 errors).
    
    Closes T2641

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

This revision is now accepted and ready to land.Sep 24 2020, 5:49 PM

Build is green

Patch application report for D4035 (id=14244)

Rebasing onto ef0f7ae0e7...

Current branch diff-target is up to date.
Changes applied before test
commit 1d48edfb2ebaa1ad3bffbf364f54d59fb3fb2ad4
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Sep 24 12:38:01 2020 +0200

    SWHIDs: Fix URLs escaping when a qualifier contains escaped chars
    
    When a SWHID qualifier contains special characters like '=' or ';', it
    must be escaped in order for the SWHID to be properly parsed afterwards.
    
    When using such a SWHID as part of an URL argument, it must also be escaped
    for special characters in order for a browser to resolve the proper URL.
    
    That commit fixes invalid unescaped URLs that were previously inserted in
    some webapp pages (leading to 400 errors).
    
    Closes T2641

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