Skip to content

Commit 6b3348b

Browse files
committed
- Security: Minimize XSS vectors by using safer jQuery methods
- Enhancement: Database abstraction layer - Enhancement: Autocomplete hints - Enhancement: `localScripts` option for using non-CDN copies - Enhancement: Use native form validation - Enhancement: Make `fromText` and `fromURL` of password reset emails configurable - Enhancement: Upon signup, ask for password confirmation - Enhancement: Require email link verification code (inspired by <braitsch#11>) - Fix: Requiring of `account.js` - Fix: Pass on CLI args properly - Fix: Add proper plain text for plain text email - i18n: Client-side i18n - Docs: Add Change log for unreleased - Docs: Indicate planned to-dos - Docs: Some further CLI documentation - Docs: Indicate license types as badges - Refactoring: Further separation of view logic out of controllers - Refactoring: Switch to Jamilih templates - Refactoring: Add scripts to head with `defer` - Refactoring: Use variables in place of selectors where possible - Linting (ESLint): As per latest ash-nazg - Testing: Add lcov report (for Atom IDE) - npm: Make scripts cross-platform - npm: Update mongodb, jamilih, jsdom, and devDeps
1 parent eba1030 commit 6b3348b

File tree

104 files changed

+8245
-5170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+8245
-5170
lines changed

.editorconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,3 @@ insert_final_newline = true
1010
indent_style = space
1111
indent_size = 2
1212
trim_trailing_whitespace = true
13-
14-
[app/public/css/**.styl]
15-
indent_style = tab
16-
indent_size = 2
17-
18-
[app/server/views/**.pug]
19-
indent_style = tab
20-
indent_size = 1

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
instrumented/**
33
coverage/**
4+
!.ncurc.js

.eslintrc.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ module.exports = {
44
"plugin:node/recommended-script",
55
"plugin:cypress/recommended"
66
],
7-
"plugins": [
8-
"pug"
9-
],
107
"env": {
118
"es6": true
129
},
@@ -46,11 +43,6 @@ module.exports = {
4643
"ecmaVersion": 2018,
4744
"sourceType": "module"
4845
}
49-
}, {
50-
files: ["*.pug"],
51-
rules: {
52-
'eol-last': 0
53-
}
5446
}],
5547
"rules": {
5648
"import/no-commonjs": 0,

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
node_modules
3-
app/server/modules/email-settings-mine.js
43

54
cypress/fixtures/example.json
65
cypress/screenshots

.ncurc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use strict';
2+
3+
module.exports = {
4+
// Whitelist all for checking besides `peer` which indicates
5+
// somewhat older versions of `eslint` we still support even
6+
// while our devDeps point to a more recent version
7+
dep: 'prod,dev,optional,bundle',
8+
reject: [
9+
// Todo[bootstrap@>4.4.1]: See if updated for css, js, and popper.js at https://github.com/twbs/bootstrap/blob/master/config.yml
10+
'bootstrap',
11+
'popper.js'
12+
]
13+
};

.pug-lintrc.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

CHANGES.md

Lines changed: 124 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,131 @@
1-
**v1.7.2** –– 11-18-2018
1+
# CHANGES for node-login
2+
3+
## ?
4+
5+
- Breaking enhancement: Avoid `process.env` (`app.js` accepts CLI now instead)
6+
- Breaking enhancement: Allow app to pass in own countries list
7+
- Breaking refactoring: `EmailDispatcher` and `AccountManager` are now classes;
8+
routes accepts config
9+
- Security: Add PBKDF2 hashing (@SCG82)
10+
- Security: Make "secret" private and configurable; add
11+
integrity/cross-origin=anonymous for jquery.form and font-awesome
12+
(switching to same CDN); add also for github-fork-ribbon-css, but comment
13+
out as not in apparent use
14+
- Security: Use signed cookie
15+
- Security: Pass secret to cookie parser as otherwise potentially problematic
16+
- Security: Rate-limiting (for DoS)
17+
- Security: Minimize XSS vectors by using safer jQuery methods
18+
- Fix: Accessibility (except for `color-contrast` whose check we are
19+
temporarily disabling until may have time to fix)
20+
- Fix: Add proper plain text for plain text email
21+
- Update: Use now required Mongodb APIs
22+
- Update: CDN for bootstrap (CSS and JS), jquery, popper
23+
- Enhancement: Database abstraction layer
24+
- Enhancement: Autocomplete hints
25+
- Enhancement: More configurabiity
26+
- Enhancement: i18n (server-side, client-side, and CLI)
27+
- Enhancement: Make available as binary (with help/version and
28+
update-notifier)
29+
- Enhancement: Add `use strict`
30+
- Enhancement: `localScripts` option for using non-CDN copies
31+
- Enhancement: Use native form validation
32+
- Enhancement: Make `fromText` and `fromURL` of password reset emails
33+
configurable
34+
- Enhancement: Require email link verification code (inspired by
35+
<https://github.com/braitsch/node-login/pull/11>)
36+
- Fix: Requiring of `account.js`
37+
- Fix: Pass on CLI args properly
38+
- Docs: Add Change log for unreleased
39+
- Docs: Indicate planned to-dos
40+
- Docs: Some further CLI documentation
41+
- Docs: CLI
42+
- Docs: Indicate license types as badges
43+
- Linting (ESLint): Apply eslint-config-ash-nazg
44+
- Refactoring: Destructuring; arrow functions for handlers;
45+
utilize succincter stylus features
46+
- Refactoring: convert further APIs to (async/await) Promises
47+
- Refactoring: Avoid inline styles
48+
- Refactoring: Further separation of view logic out of controllers
49+
- Refactoring: Switch to Jamilih templates
50+
- Refactoring: Add scripts to head with `defer`
51+
- Refactoring: Use variables in place of selectors where possible
52+
- Linting (ESLint): As per latest ash-nazg
53+
- Testing: Cypress testing, including axe accessibility testing;
54+
add sourcemaps to stylus; coverage
55+
- Maintenance: Add `.editorconfig`
56+
- npm: Mongodb and server start scripts
57+
- npm: Add recommended `package.json` fields; allow Node >= 10.4.0 in `engines`
58+
- npm: Update deps and devDeps
59+
60+
## v1.7.2 –– 11-18-2018
61+
62+
- auto-login & password-reset now validating against UUIDs and the user's last recorded IP address
63+
64+
## v1.7.1 –– 11-18-2018
65+
66+
- updating mongodb calls to latest driver
67+
- [fix for #12](https://github.com/braitsch/node-login/pull/12)
68+
69+
## v1.7.0 –– 11-18-2018
70+
71+
- updated dependencies to latest versions
72+
- bootstrap v4.1.3 & jquery v3.3.1
73+
- style.css completely rewritten
74+
- [fix for #36](https://github.com/braitsch/node-login/issues/36)
75+
76+
## v1.6.0 –– 06-10-2018
77+
78+
- updated dependencies to latest versions
79+
- updated mongodb connection scheme
80+
- replaced jade templating engine with pug
81+
82+
## v1.5.0 –– 04-21-2016
83+
84+
- redesigned login window
85+
- improved error handling on password reset
86+
- updating client side libraries:
87+
- jQuery –– v2.2.3
88+
- jQuery.form –– v3.51.0
89+
- Twitter Bootstrap –– v3.3.6
90+
91+
## v1.4.1 –– 02-27-2016
92+
93+
- calls to logout now route to /logout instead of /home
94+
- accounts are now looked up by session.id instead of username
95+
- reset-password modal window fixes
96+
- updating emailjs to v1.0.4
97+
- switching to environment variables for email settings
98+
99+
## v1.4.0 –– 06-14-2015
100+
101+
- updating to Express v4.12.4
102+
- adding connect-mongo for db session store
103+
104+
## v1.3.2 –– 03-11-2013
105+
106+
- fixed bug on password reset
107+
108+
## v1.3.1 –– 03-07-2013
109+
110+
- adding MIT license
111+
112+
## v1.3.0 –– 01-10-2013
113+
114+
- updating to Express v3.0.6
115+
116+
## v1.2.1 –– 01-03-2013
2117

3-
* auto-login & password-reset now validating against UUIDs and the user's last recorded IP address
118+
- moving vendor libs to /public/vendor
4119

5-
**v1.7.1** –– 11-18-2018
120+
## v1.2.0 –– 12-27-2012
6121

7-
* updating mongodb calls to latest driver
8-
* [fix for #12](https://github.com/braitsch/node-login/pull/12)
122+
- updating MongoDB driver to 1.2.7
123+
- replacing bcrypt module with native crypto
9124

10-
**v1.7.0** –– 11-18-2018
125+
## v1.1.0 –– 08-12-2012
11126

12-
* updated dependencies to latest versions
13-
* bootstrap v4.1.3 & jquery v3.3.1
14-
* style.css completely rewritten
15-
* [fix for #36](https://github.com/braitsch/node-login/issues/36)
127+
- adding /print & /reset methods
16128

17-
**v1.6.0** –– 06-10-2018
129+
## v1.0.0 –– 08-07-2012
18130

19-
* updated dependencies to latest versions
20-
* updated mongodb connection scheme
21-
* replaced jade templating engine with pug
22-
23-
**v1.5.0** –– 04-21-2016
24-
25-
* redesigned login window
26-
* improved error handling on password reset
27-
* updating client side libraries:
28-
* jQuery –– v2.2.3
29-
* jQuery.form –– v3.51.0
30-
* Twitter Bootstrap –– v3.3.6
31-
32-
**v1.4.1** –– 02-27-2016
33-
34-
* calls to logout now route to /logout instead of /home
35-
* accounts are now looked up by session.id instead of username
36-
* reset-password modal window fixes
37-
* updating emailjs to v1.0.4
38-
* switching to environment variables for email settings
39-
40-
--
41-
**v1.4.0** –– 06-14-2015
42-
43-
* updating to Express v4.12.4
44-
* adding connect-mongo for db session store
45-
46-
--
47-
**v1.3.2** –– 03-11-2013
48-
49-
* fixed bug on password reset
50-
51-
--
52-
**v1.3.1** –– 03-07-2013
53-
54-
* adding MIT license
55-
56-
--
57-
**v1.3.0** –– 01-10-2013
58-
59-
* updating to Express v3.0.6
60-
61-
--
62-
**v1.2.1** –– 01-03-2013
63-
64-
* moving vendor libs to /public/vendor
65-
66-
--
67-
**v1.2.0** –– 12-27-2012
68-
69-
* updating MongoDB driver to 1.2.7
70-
* replacing bcrypt module with native crypto
71-
72-
--
73-
**v1.1.0** –– 08-12-2012
74-
75-
* adding /print & /reset methods
76-
77-
--
78-
**v1.0.0** –– 08-07-2012
79-
80-
* initial release
81-
82-
--
131+
- initial release

0 commit comments

Comments
 (0)