forked from snyk-labs/nodejs-goof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add open redirect and xss vulns in code (snyk-labs#960)
- Loading branch information
Showing
7 changed files
with
119 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @TODO use this adminService file once Snyk Code for VSCode | ||
// is able to navigate to cross-file paths in the vuln description | ||
/** | ||
module.exports.adminLoginSuccess = function(redirectPage, res) { | ||
console.log({redirectPage}) | ||
if (redirectPage) { | ||
return res.redirect(redirectPage) | ||
} else { | ||
return res.redirect('/admin') | ||
} | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<% layout( 'layout' ) -%> | ||
<style> | ||
strong {font-weight: bold} | ||
</style> | ||
<h1 id="page-title"><%= title %></h1> | ||
|
||
<div id="list"> | ||
<form action="/" method="get" accept-charset="utf-8"> | ||
<div class="item-new"> | ||
<center>First name</center> | ||
<input class="input" type="text" name="firstname" value="admin" /> | ||
<br/> | ||
|
||
<center>Last name</center> | ||
<input class="input" type="text" name="firstname" value="baba" /> | ||
<br/> | ||
|
||
<center>Country</center> | ||
<input class="input" type="text" name="firstname" value="Israel" /> | ||
<br/> | ||
|
||
<center>Phone number</center> | ||
<input class="input" type="text" name="firstname" value="972-412-312-444" /> | ||
<br/> | ||
|
||
<center>Email</center> | ||
<input class="input" type="text" name="firstname" value="[email protected]" /> | ||
<br/> | ||
|
||
</div> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters