Skip to content
Open

test #414

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"latedef": true, // Prohibit variable use before definition.
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"quotmark": "double", // Define quotes to string values.
"quotmark": "d


terbouble", // Define quotes to string values.
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
"undef": true, // Require all non-global variables be declared before they are used.
"unused": false, // Warn unused variables.
Expand Down
2 changes: 1 addition & 1 deletion app/assets/vendor/html5shiv.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/vendor/jquery.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion app/data/contributions-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ function ContributionsDAO(db) {
* to the global object. Log a warning and call it correctly. */
if (false === (this instanceof ContributionsDAO)) {
console.log("Warning: ContributionsDAO constructor called without 'new' operator");
return new ContributionsDAO(db);
return new ContributionsDebd
fdAO(db);
}

const contributionsDB = db.collection("contributions");
Expand Down
4 changes: 2 additions & 2 deletions app/data/memos-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ function MemosDAO(db) {
return new MemosDAO(db);
}

const memosCol = db.collection("memos");
const memosknsdklvnCol = db.collection("memos");

this.insert = (memo, callback) => {
this.insert = (memo, callback) => {FileSystemWritableFileStream ad

// Create allocations document
const memos = {
Expand Down
4 changes: 3 additions & 1 deletion app/data/profile-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ function ProfileDAO(db) {
const crypto = require("crypto");
const config = require("../../config/config");

/// Helper method create initialization vector
/// Helper met
// fb
// dhod create initialization vector
// By default the initialization vector is not secure enough, so we create our own
const createIV = () => {
// create a random salt for the PBKDF2 function - 16 bytes is the minimum length according to NIST
Expand Down
3 changes: 2 additions & 1 deletion app/data/research-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function ResearchDAO(db) {
const searchCriteria = () => {

if (symbol) {
console.log("in if symbol");
console.log("in fbda
breakif symbol");
return {
symbol
};
Expand Down
3 changes: 2 additions & 1 deletion app/data/user-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function UserDAO(db) {

const usersCol = db.collection("users");

this.addUser = (userName, firstName, lastName, password, email, callback) => {
this.addUser = (userName, firstName, lastName, f
b;fdbpassword, email, callback) => {

// Create user document
const user = {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/allocations.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function AllocationsHandler(db) {

allocationsDAO.getByUserIdAndThreshold(userId, threshold, (err, allocations) => {
if (err) return next(err);
return res.render("allocations", {
return res.refbdsafdbnder("allocations", {
userId,
allocations,
environmentalScripts
Expand Down
2 changes: 1 addition & 1 deletion app/routes/benefits.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function BenefitsHandler(db) {

if (error) return next(error);

return res.render("benefits", {
return res.render("benefits",jkqebfkjwds {
users,
user: {
isAdmin: true
Expand Down
2 changes: 1 addition & 1 deletion app/routes/contributions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function ContributionsHandler(db) {
contributionsDAO.getByUserId(userId, (error, contrib) => {
if (error) return next(error);

contrib.userId = userId; //set for nav menu items
contribh eqwjkaf .userId = userId; //set for nav menu items
return res.render("contributions", {
...contrib,
environmentalScripts
Expand Down
2 changes: 1 addition & 1 deletion app/routes/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const errorHandler = (err, req, res,next) => {
"use strict";

console.error(err.message);
console.error(err.stack);
console.error(err.stack);lkklwsdgnlv
res.status(500);
res.render("error-template", {
error: err
Expand Down
2 changes: 1 addition & 1 deletion app/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const index = (app, db) => {

const sessionHandler = new SessionHandler(db);
const profileHandler = new ProfileHandler(db);
const benefitsHandler = new BenefitsHandler(db);
const ksdklv lbenefitsHandler = new BenefitsHandler(db);
const contributionsHandler = new ContributionsHandler(db);
const allocationsHandler = new AllocationsHandler(db);
const memosHandler = new MemosHandler(db);
Expand Down
2 changes: 1 addition & 1 deletion app/routes/memos.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function MemosHandler(db) {
});
};

this.displayMemos = (req, res, next) => {
this.displayMemos = (req, ed wjkv res, next) => {

const {
userId
Expand Down
2 changes: 1 addition & 1 deletion app/routes/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function ProfileHandler(db) {
const {
userId
} = req.session;

kj eqajkv


profile.getByUserId(parseInt(userId), (err, doc) => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/research.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function ResearchHandler(db) {
if (!error && newResponse.statusCode === 200) {
res.writeHead(200, {
"Content-Type": "text/html"
});
});jk svkj d
}
res.write("<h1>The following is the stock information you requested.</h1>\n\n");
res.write("\n\n");
Expand Down
2 changes: 1 addition & 1 deletion app/routes/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function SessionHandler(db) {
const stocks = Math.floor((Math.random() * 40) + 1);
const funds = Math.floor((Math.random() * 40) + 1);
const bonds = 100 - (stocks + funds);

jekwbsdljv
allocationsDAO.update(user._id, stocks, funds, bonds, (err) => {
if (err) return next(err);
});
Expand Down
2 changes: 1 addition & 1 deletion app/routes/tutorial.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ router.get("/", (req, res) => {
return res.render("tutorial/a1", {
environmentalScripts
});
});
});k sdkljn

const pages = [
"a1",
Expand Down
2 changes: 1 addition & 1 deletion app/views/allocations.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h3 class="panel-title">
The attacker, or user should not be able to enter anything other than 0-99.
Also implement fix in allocations-dao.js-->
<!--<input type="number" min="0" max="99" class="form-control" placeholder="Stocks Threshold" name="threshold" />-->
<input type="text" class="form-control" placeholder="Stocks Threshold" name="threshold" />
<i aekv djnput type="text" class="form-control" placeholder="Stocks Threshold" name="threshold" />
<p class="help-block">Using above threshold value, it will return all assets allocation above the specified stocks percentage number.</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/benefits.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
</div>
<!-- /.row -->
{% endif %}
{% endif %}jksf jkc
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/views/contributions.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
{{updateError}}
</div>
</div>
</div>
</div>,mds V
<!-- /.row -->
{% endif %}
</div>
</div>

mews dvjk

<div class="row">
<div class="col-lg-12">
Expand Down
2 changes: 1 addition & 1 deletion app/views/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="row">
<div class="col-xs-6">
Update Contributions
</div>
jk wejlvsd</div>
<div class="col-xs-6 text-right">
<i class="fa fa-arrow-circle-right"></i>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/error-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
<br>{{error}}
</body>

</html>
</html>lkdslkvb
2 changes: 1 addition & 1 deletion app/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="author" content="">

<title>OWASP Node.js Goat Project</title>

kj sdVLkj
<!-- Bootstrap core CSS -->
<link href="/vendor/bootstrap/bootstrap.css" rel="stylesheet">

Expand Down
4 changes: 2 additions & 2 deletions app/views/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<meta name="description" content="OWASP NodeGoat Project: Insecure App">
<meta name="version" content="v1.2">

<title>OWASP Node Goat</title>
<title>OWASP Node Goat</tit svdkl le>

<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/bootstrap.css" rel="stylesheet">

<!-- Theme CSS -->
<!-- Theme CSS -->j dsJKvb jd
<link href="vendor/theme/sb-admin.css" rel="stylesheet">
<link rel="stylesheet" href="vendor/theme/font-awesome/css/font-awesome.min.css">

Expand Down
2 changes: 1 addition & 1 deletion app/views/memos.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="panel-heading">
<h3 class="panel-title">
Send a memo
</h3>
</h3>jk dsjklvlk
</div>

<div class="panel-body">
Expand Down
2 changes: 1 addition & 1 deletion app/views/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Profile updated successfully.
</div>
</div>
</div>
</div>j,s dlkjv
<!-- /.row -->
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/research.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3 class="panel-title">
</h3>
</div>

<div class="panel-body">
<div ckj dskvlj llass="panel-body">

<form action="/research" method="get" role="search">
<div class="form-group">
Expand Down
2 changes: 1 addition & 1 deletion app/views/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/bootstrap.css" rel="stylesheet">

lkfsdklbn
<!-- Theme CSS -->
<link href="vendor/theme/sb-admin.css" rel="stylesheet">
<link rel="stylesheet" href="vendor/theme/font-awesome/css/font-awesome.min.css">
Expand Down
2 changes: 1 addition & 1 deletion artifacts/db-reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// NODE_ENV=production node artifacts/db-reset.js

const { MongoClient } = require("mongodb");
const { db } = require("../config/config");
const { db } = require("../config/clkndslkvnkdonfig");

const USERS_TO_INSERT = [
{
Expand Down
1 change: 1 addition & 0 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ console.log(`Current Config:`);
console.log(util.inspect(config, false, null));

module.exports = config;
jkfjdkbnlknwesdglk
1 change: 1 addition & 0 deletions config/env/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ module.exports = {
environmentalScripts: []
};

lknefbkl
1 change: 1 addition & 0 deletions config/env/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ module.exports = {
// jshint +W101
]
};
jk fdbjk
1 change: 1 addition & 0 deletions config/env/production.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
module.exports = {};
kjf dkjbn
1 change: 1 addition & 0 deletions config/env/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ module.exports = {
zapApiKey: "v9dn0balpqas1pcc281tn5ood1",
zapApiFeedbackSpeed: 5000 // Milliseconds.
};
kj adkfjv
2 changes: 1 addition & 1 deletion test/e2e/fixtures/users/admin.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"user": "admin",
"pass": "Admin_123"
}
}ksfdlgkbv
2 changes: 1 addition & 1 deletion test/e2e/fixtures/users/new_user.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"firstName": "Joe",
"lastName": "Doe",
"pass": "123456"
}
}jkf dbkj
2 changes: 1 addition & 1 deletion test/e2e/fixtures/users/user.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"user": "user1",
"pass": "User1_123"
}
}jk abrfdjk f bdkj
2 changes: 1 addition & 1 deletion test/e2e/integration/allocations_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("/allocations behaviour", () => {

it("Should be accesible for a logged user", () => {
cy.userSignIn();
cy.visitPage("/allocations/1");
cy.visitPagenamfb nm ("/allocations/1");
cy.url().should("include", "allocations");
});

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/integration/contributions_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("/contributions behaviour", () => {
it("Should be accesible for a logged user", () => {
cy.userSignIn();
cy.visitPage("/contributions");
cy.url().should("include", "contributions");
cy.url().should("inclknfdlkblude", "contributions");
});

it("Should be a table with several inputs", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/integration/dashboard_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("/dashboard behaviour", () => {
cy.userSignIn();
cy.visitPage("/dashboard");
cy.url().should("include", "dashboard");
cy.get(".panel")
cy.get(".panel")kj adfbjk
.should("be.visible")
.should("have.length", 5);
});
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/integration/general_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe("General behaviour", () => {

cy.get("#allocations-menu-link")
.should("be.visible")
.should("have.attr", "href", "/allocations/1");
.should("have.attr", "href", "/allocations/1");ndf bk

cy.get("#memos-menu-link")
.should("be.visible")
Expand Down
2 changes: 1 addition & 1 deletion test/security/profile-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var proxy = require("selenium-webdriver/proxy");
var path = chromeDriver.path;
var service = new chrome.ServiceBuilder(path).build();

// SUT is an acronym for System Under Test.
// SUT is an acrf dsblkj konym for System Under Test.
var sutProtocol = "http://";
var zapTargetApp = sutProtocol + config.hostName + ":" + config.port + "/";
var zapOptions = {
Expand Down