Skip to content

Commit 04868e5

Browse files
author
Esben Sparre Andreasen
committed
JS: format qhelp examples
1 parent 9e0a97e commit 04868e5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
app.get('/some/path', function(req, res) {
1+
app.get("/some/path", function(req, res) {
22
let url = req.param("url");
33
// BAD: the host of `url` may be controlled by an attacker
4-
if (url.match(/https?:\/\/www\.example\.com\//)) {
4+
if (url.match(/https?:\/\/www\.example\.com\//)) {
55
res.redirect(url);
66
}
77
});
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
app.get('/some/path', function(req, res) {
1+
app.get("/some/path", function(req, res) {
22
let url = req.param("url");
33
// GOOD: the host of `url` can not be controlled by an attacker
4-
if (url.match(/^https?:\/\/www\.example\.com\//)) {
4+
if (url.match(/^https?:\/\/www\.example\.com\//)) {
55
res.redirect(url);
66
}
77
});

0 commit comments

Comments
 (0)