Skip to content

Commit

Permalink
Re-encode query.scope if it's going back into a URL
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Feb 2, 2024
1 parent 647b1ce commit 3e9315f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions phase-2/poc/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ http.createServer((req, res) => {
res.end(
screen2part1 + obj.humanReadable +
screen2part2 + clientTicket +
screen2part3 + query.scope +
screen2part3 + encodeURIComponent(query.scope) +
screen2part4
);
} catch (e) {
Expand Down Expand Up @@ -82,7 +82,7 @@ http.createServer((req, res) => {
res.end(
screen2part1 + obj.humanReadable +
screen2part2 + query.state +
screen2part3 + query.scope +
screen2part3 + encodeURIComponent(query.scope) +
screen2part4
);
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion phase-2/poc/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ http.createServer((req, res) => {
console.log(`fetched details for scope ${query.scope} from Research Drive`, obj);
const webdavUrl = obj.protocols.webdav.url;
res.end(
screen3part1 + query.scope +
screen3part1 + encodeURIComponent(query.scope) +
screen3part2 + makeid(8) +
screen3part3 + webdavUrl
);
Expand Down

0 comments on commit 3e9315f

Please sign in to comment.