Skip to content

Commit

Permalink
Fix security issues (#578)
Browse files Browse the repository at this point in the history
* fix security issues

* Add EOF and Fixes command
  • Loading branch information
HananMehmood5 authored Apr 21, 2022
1 parent 5b1edb9 commit 545d197
Show file tree
Hide file tree
Showing 4 changed files with 2,006 additions and 3,201 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM swift:4.2.4
WORKDIR /app
ADD . ./
COPY . ./
RUN git submodule update --init --recursive
RUN swift package clean
RUN swift build -c release
RUN mkdir /app/bin
RUN mv `swift build -c release --show-bin-path` /app/bin
EXPOSE 8080
ENTRYPOINT ./bin/release/Run serve -e prod -b 0.0.0.0
ENTRYPOINT ["/app/bin/release/Run", "serve", "-e", "prod", "-b", "0.0.0.0"]
6 changes: 5 additions & 1 deletion e2e-tests/utils/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ const randomTemplate = () => randomTemplates(1)[0];
const randomTemplates = (n) => {
testTemplates = [];
for (let index = 0; index < n; index++) {
testTemplates.push(templates[Math.floor(Math.random() * templates.length)]);
const myNumArr = new Uint32Array(1);
crypto.getRandomValues(myNumArr);
const randomNumber = Number(`0.${myNumArr[0]}`);

testTemplates.push(templates[Math.floor(randomNumber * templates.length)])
}
return testTemplates;
}
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"license": "MIT",
"private": true,
"devDependencies": {
"jest": "^25.1.0",
"jest-puppeteer": "^4.4.0",
"jest": "^27.5.1",
"jest-puppeteer": "^6.1.0",
"puppeteer": "^2.1.1"
},
"scripts": {
Expand All @@ -14,8 +14,8 @@
"test": "jest e2e-tests"
},
"dependencies": {
"css-loader": "^5.2.6",
"css-minimizer-webpack-plugin": "^3.0.1",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"file-loader": "^6.2.0",
"jquery": "^3.6.0",
"less": "^4.1.1",
Expand Down
Loading

0 comments on commit 545d197

Please sign in to comment.