Skip to content

Commit

Permalink
Merge pull request #1298 from opentripplanner/trusted-companions-qbd
Browse files Browse the repository at this point in the history
Additions to Trusted companions PR
  • Loading branch information
josh-willis-arcadis authored Nov 4, 2024
2 parents 186b634 + ba97b8e commit f039959
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/components/user/mobility-profile/companions-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ const CompanionsPane = ({
...companions,
{
email: newEmail,
status: 'PENDING',
userId: ''
status: 'PENDING'
}
])
resetForm()
Expand Down
21 changes: 21 additions & 0 deletions public/confirmation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<title>Request Result</title>
</head>
<body>
<p id="contents">
Your request is confirmed.
<noscript>If an error occurred, a message is embedded in the URL for this page, but could not be parsed.</noscript>
</p>
</body>
<script>
var search = window.location.search.split("?")[1];
if (search) {
var urlParams = search.split(";");
var errorParam = urlParams.find(p => p.startsWith("error="));
if (errorParam) {
document.getElementById("contents").innerHTML = `An error occurred: ${decodeURIComponent(errorParam.split("=")[1])}`;

Check failure

Code scanning / CodeQL

Client-side cross-site scripting High

Cross-site scripting vulnerability due to
user-provided value
.
}
}
</script>
</html>

0 comments on commit f039959

Please sign in to comment.