Page MenuHomeSoftware Heritage

utils/exc: Ensure exception text is escaped in HTML error page
ClosedPublic

Authored by anlambert on Oct 26 2022, 4:10 PM.

Details

Summary

Some exception texts like the RemoteException ones were not correctly
rendered in HTML error page as they were not escaped.

Before:

After:

Depends on D8780

Diff Detail

Repository
rDWAPPS Web applications
Branch
utils-exc-fixes
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 32602
Build 51073: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 51072: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D8781 (id=31648)

Could not rebase; Attempt merge onto a2526ef5bb...

Updating a2526ef5..3f5f028f
Fast-forward
 swh/web/tests/utils/test_exc.py | 39 +++++++++++++++++++++++++++++++++++++++
 swh/web/utils/exc.py            | 25 +++++++++++++++----------
 2 files changed, 54 insertions(+), 10 deletions(-)
 create mode 100644 swh/web/tests/utils/test_exc.py
Changes applied before test
commit 3f5f028f76ac15f257d3cddd426b809ff32b26a5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 16:06:39 2022 +0200

    utils/exc: Ensure exception text is escaped in HTML error page
    
    Some exception texts like the RemoteException ones were not correctly
    rendered in HTML error page as they were not escaped.

commit d2c653d3e9c376697788274408e653eb43eedef3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 15:24:17 2022 +0200

    utils/exc: Add typing

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

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 26 2022, 4:19 PM
Harbormaster failed remote builds in B32601: Diff 31648!

Build has FAILED

Patch application report for D8781 (id=31648)

Could not rebase; Attempt merge onto a2526ef5bb...

Updating a2526ef5..3f5f028f
Fast-forward
 swh/web/tests/utils/test_exc.py | 39 +++++++++++++++++++++++++++++++++++++++
 swh/web/utils/exc.py            | 25 +++++++++++++++----------
 2 files changed, 54 insertions(+), 10 deletions(-)
 create mode 100644 swh/web/tests/utils/test_exc.py
Changes applied before test
commit 3f5f028f76ac15f257d3cddd426b809ff32b26a5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 16:06:39 2022 +0200

    utils/exc: Ensure exception text is escaped in HTML error page
    
    Some exception texts like the RemoteException ones were not correctly
    rendered in HTML error page as they were not escaped.

commit d2c653d3e9c376697788274408e653eb43eedef3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 15:24:17 2022 +0200

    utils/exc: Add typing

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

Build has FAILED

Patch application report for D8781 (id=31648)

Could not rebase; Attempt merge onto a2526ef5bb...

Updating a2526ef5..3f5f028f
Fast-forward
 swh/web/tests/utils/test_exc.py | 39 +++++++++++++++++++++++++++++++++++++++
 swh/web/utils/exc.py            | 25 +++++++++++++++----------
 2 files changed, 54 insertions(+), 10 deletions(-)
 create mode 100644 swh/web/tests/utils/test_exc.py
Changes applied before test
commit 3f5f028f76ac15f257d3cddd426b809ff32b26a5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 16:06:39 2022 +0200

    utils/exc: Ensure exception text is escaped in HTML error page
    
    Some exception texts like the RemoteException ones were not correctly
    rendered in HTML error page as they were not escaped.

commit d2c653d3e9c376697788274408e653eb43eedef3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 15:24:17 2022 +0200

    utils/exc: Add typing

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

Build has FAILED

Patch application report for D8781 (id=31648)

Could not rebase; Attempt merge onto a2526ef5bb...

Updating a2526ef5..3f5f028f
Fast-forward
 swh/web/tests/utils/test_exc.py | 39 +++++++++++++++++++++++++++++++++++++++
 swh/web/utils/exc.py            | 25 +++++++++++++++----------
 2 files changed, 54 insertions(+), 10 deletions(-)
 create mode 100644 swh/web/tests/utils/test_exc.py
Changes applied before test
commit 3f5f028f76ac15f257d3cddd426b809ff32b26a5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 16:06:39 2022 +0200

    utils/exc: Ensure exception text is escaped in HTML error page
    
    Some exception texts like the RemoteException ones were not correctly
    rendered in HTML error page as they were not escaped.

commit d2c653d3e9c376697788274408e653eb43eedef3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 15:24:17 2022 +0200

    utils/exc: Add typing

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

Build is green

Patch application report for D8781 (id=31649)

Could not rebase; Attempt merge onto a2526ef5bb...

Updating a2526ef5..df0bb952
Fast-forward
 swh/web/tests/utils/test_exc.py | 39 +++++++++++++++++++++++++++++++++++++++
 swh/web/utils/exc.py            | 26 +++++++++++++++++---------
 2 files changed, 56 insertions(+), 9 deletions(-)
 create mode 100644 swh/web/tests/utils/test_exc.py
Changes applied before test
commit df0bb952e96da506b7c2268678d7a02e04f69de6
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 16:06:39 2022 +0200

    utils/exc: Ensure exception text is escaped in HTML error page
    
    Some exception texts like the RemoteException ones were not correctly
    rendered in HTML error page as they were not escaped.

commit d2c653d3e9c376697788274408e653eb43eedef3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Oct 26 15:24:17 2022 +0200

    utils/exc: Add typing

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

This revision is now accepted and ready to land.Oct 26 2022, 5:14 PM