Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

43 secure output route #46

Merged
merged 30 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
14b29eb
[Task] #43 create color pallette
Type-Style Feb 14, 2024
513315d
[Task] #43 create color pallette
Type-Style Feb 14, 2024
b4f99c5
[Task] #43 cleanup colors and svg
Type-Style Feb 14, 2024
cc6b8c3
[Task] #41 remove test code
Type-Style Feb 15, 2024
14ca99d
[CHANGE] #3 reconfigured nodemon to copy static files
Type-Style Feb 15, 2024
d077414
[Task] #18 replaced getRawBody with builtIn express urlEncoded
Type-Style Feb 16, 2024
6ebece8
[Temp, Task] #43 basic login page, not yet used as middleware
Type-Style Feb 16, 2024
5087ae2
[Temp] #43, create and validate json web token
Type-Style Mar 4, 2024
95b5322
[Task] #43, add slowDown and RateLimit for failed login attempts
Type-Style Mar 5, 2024
f01d579
[Task] #43, ratelimit for login page
Type-Style Mar 8, 2024
24506ac
[Task] #43, add global ratelimiter
Type-Style Mar 8, 2024
67d8ce0
[fix] #7, improve error handeling for express errors
Type-Style Mar 8, 2024
b022c31
[Task] #43 rework body limitations to be checked only appropiate methods
Type-Style Mar 10, 2024
81155fe
[Task] #43 added check for data before using it
Type-Style Mar 10, 2024
42d64a9
[Task] #43 check that body is ignored for GET in request
Type-Style Mar 10, 2024
e866047
[Task] #43 login test
Type-Style Mar 10, 2024
594aec9
[Task] #43 create tests for login
Type-Style Mar 12, 2024
b1572cd
[Task] #43 fine tune error handling
Type-Style Mar 13, 2024
32c9884
[Task] #43, finished login and jwt related tests
Type-Style Mar 13, 2024
eb51ec8
[Change] #34, no further need for test logging
Type-Style Mar 13, 2024
3ca5322
[Task] #43, fine tune jwt, middleware process improved
Type-Style Mar 13, 2024
4c94465
[CHANGE] #43 created new esLint to have clientside js without ts
Type-Style Mar 13, 2024
43e6db1
[Temp] #43 test to see new linter configuration
Type-Style Mar 13, 2024
5bbc1bf
[Change] #43 switched to bcrypt for passwords
Type-Style Mar 15, 2024
64c1201
[Task] #43 read return json in all cases
Type-Style Mar 15, 2024
f213d02
[Task] #43 introduced color classes
Type-Style Mar 18, 2024
dc745d0
Merge remote-tracking branch 'origin/dev' into 43-secure-output-route
Type-Style Mar 19, 2024
f76ca49
[Task] #43, prq feedback
Type-Style Mar 19, 2024
4ff8857
[Temp} #43 figuring out why tests dont run on github
Type-Style Mar 19, 2024
8a681ed
[Task] #43 code cleanup
Type-Style Mar 19, 2024
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
//"@typescript-eslint/no-unused-vars": "warn"
"jest/no-conditional-expect": "off"
},
"ignorePatterns": ["dist", "jest.config.js"]
"ignorePatterns": ["dist", "jest.config.js", "httpdocs"]

}
9 changes: 4 additions & 5 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
with:
node-version: 16
- run: npm ci # or yarn install
- uses: sibiraj-s/action-eslint@v3
with:
eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js,jsx,ts,tsx'
annotations: true
- name: Lint server-side code
run: npx eslint src/ --fix
- name: Lint client-side code
run: npx eslint httpdocs/js/ --fix
159 changes: 159 additions & 0 deletions httpdocs/color-table.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions httpdocs/css/colors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
created by atmos https://app.atmos.style/65cc9eaec76d443c0a796d4b

** base configuration colors **
Main: #f90
Info: #231aee
Danger: #ff0000
Success: #59ec04
Neutral: #131211
*/
:root {
/* main */
--main-900: oklch(10% 0.02 64.55);
--main-750: oklch(25% 0.056 64.55);
--main-625: oklch(37.5% 0.085 64.55);
--main-500: oklch(50% 0.114 64.55);
--main-375: oklch(62.5% 0.142 64.55);
--main-250: oklch(77.2% 0.1738 64.55); /* base */
--main-100: oklch(90% 0.06 64.55);

/* info */
--info-900: oklch(10% 0.055 268.01);
--info-750: oklch(25% 0.158 268.01);
--info-625: oklch(37.5% 0.237 268.01);
--info-500: oklch(44.87% 0.2838 268.01); /* base */
--info-375: oklch(62.5% 0.19 268.01);
--info-250: oklch(77.2% 0.109 268.01);
--info-100: oklch(90% 0.04 268.01);

/* alert */
--alert-900: oklch(10% 0.036 29.23);
--alert-750: oklch(25% 0.103 29.23);
--alert-625: oklch(37.5% 0.154 29.23);
--alert-500: oklch(47.4% 0.195 29.23);
--alert-375: oklch(62.8% 0.2577 29.23); /* base */
--alert-250: oklch(77.2% 0.133 29.23);
--alert-100: oklch(90% 0.045 29.23);

/* success */
--success-900: oklch(10% 0.029 138.96);
--success-750: oklch(25% 0.083 138.96);
--success-625: oklch(37.5% 0.124 138.96);
--success-500: oklch(47.4% 0.157 138.96);
--success-375: oklch(62.5% 0.208 138.96);
--success-250: oklch(83% 0.2607 138.96); /* base */
--success-100: oklch(90% 0.201 138.96);

/* neutral */
--neutral-900: oklch(10% 0.001 67.66);
--neutral-750: oklch(18.3% 0.0026 67.66); /* base */
--neutral-625: oklch(37.5% 0.006 67.66);
--neutral-500: oklch(47.4% 0.007 67.66);
--neutral-375: oklch(62.5% 0.009 67.66);
--neutral-250: oklch(77.2% 0.011 67.66);
--neutral-100: oklch(90% 0.004 67.66);
}
20 changes: 20 additions & 0 deletions httpdocs/css/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
form {
margin-inline: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: 500px;
gap: 10px;
}
input, button {
flex-grow: 1;
}
textarea, h1 {
flex-basis: 100%;
}
textarea {
height: 50vh;
}
h1 {
text-align: center;
}
12 changes: 12 additions & 0 deletions httpdocs/js/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
}
}
2 changes: 2 additions & 0 deletions httpdocs/js/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
let hello = "";

Check failure on line 1 in httpdocs/js/login.js

View workflow job for this annotation

GitHub Actions / eslint

'hello' is assigned a value but never used
eval('alert("hello")');
Fixed Show fixed Hide fixed
8 changes: 8 additions & 0 deletions nodemon-static.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"watch": [
"httpdocs"
],
"ext": "*",
"ignore": [],
"exec": "cp -R httpdocs/ dist/"
}
File renamed without changes.
Loading
Loading