Commit Graph

38 Commits

Author SHA1 Message Date
OldHawk
448f868099 oper/admin can ban/kick user out to chat room now~~ 2017-05-12 16:38:02 +08:00
OldHawk
46fb8015a7 overwrite user model toJSON, make is_vip vitrual field 2017-05-03 18:20:31 +08:00
OldHawk
10b28b379e fixed up/down bytes and peer status 2017-04-19 19:20:46 +08:00
OldHawk
a9c516f3f4 add fields about vip/score of user table 2017-04-18 15:32:25 +08:00
OldHawk
dfcfc6db48 announce request update more function 2017-04-17 16:53:02 +08:00
OldHawk
9d74664f26 make passkey when user signup 2017-04-16 17:46:15 +08:00
OldHawk
1181d48f5a announce request: user status check normal,banned,sealed 2017-04-15 15:48:07 +08:00
OldHawk
e13171dc87 add relationship on model user,torrent,peer 2017-04-11 22:27:57 +08:00
OldHawk
fd9fc1d02f modify torrent & user model 2017-04-09 20:55:57 +08:00
OldHawk
74da8464c2 add passkey field in user model 2017-04-08 04:01:45 +08:00
OldHawk
6de8eac7b6 add many fields for torrents about 2017-03-25 16:05:26 +08:00
Sujeeth
fb9d9d912c feat(user): add strict validations for username (#1574)
Idea proposed by @sparshy #1204
Suggestions, rules and tests from Trustroots @simison
Added validations on user server model
Added client side validations
Added relevant tests on user server tests
Added relevant tests on user e2e tests

Fixes #1204
2016-10-19 20:40:26 -07:00
walter
0588eaba48 Moved owasp config into default and reverted other config files.
Modified config to be "shared". This will allow future configurations to be easily passed to the client.
2016-09-12 11:53:22 -07:00
walter
8dcf3f6728 Fixed minor type-o's and set owasp.config() rather than the underlying configs. 2016-09-08 12:08:37 -07:00
walter
c0a1ce5ea5 Removed debug code. 2016-09-08 11:25:05 -07:00
walter
4ddb059346 switched to handlebar template for passing the server's owasp config down to the client.
reverted some of the other changes (regarding the http request).
2016-09-08 11:17:41 -07:00
walter
d896d07d8b Added configuration for owasp. Synchronize client owap configs with the server configs.
Also added a time indicator on failed login attempts to give the user feedback on subsequent failed login attempts.
2016-09-07 19:16:11 -07:00
Mikael Korpela
96aec09488 fix(user): specify a digest with crypto.pbkdf2Sync (#1429)
Fixes Node v6 crypto deprecation warning
 “crypto.pbkdf2 without specifying a digest is deprecated. Please specify a digest”
2016-08-26 10:13:51 +03:00
Michael Leanos
4906611ccc fix(users): GitHub strategy missing email (#1250)
Fixes an issue with an empty/missing/null Email coming from GitHub's
OAuth call response.

Also, introduces the `sparse` index option on the User model's Email
field. This will ensure that we can have multiple User documents without
the Email field.

Adds a server-side User model test for the sparse index setting on the
email field.

Confirms that User documents without the email field are not indexed,
illustrating the sparse option on the schema's email field works
properly.

Added the dropdb task to the Gulp test:client & test:server tasks, to
ensure we have a clean database & that any indexes are rebuilt; this
will ensure any Schema changes (in this case the email index is rebuilt using
the sparse index option) are reflected when the database is started again.

Added a UPGRADE.md for tracking important upgrade information for our
user's to be aware of, when we introduce potentially breaking changes.

Included an explanation of the Sparse index being added, and how to apply it
to an existing MEANJS application's database.

Adds a script for dropping the `email` field's index from the User
collection.

Related #1145
2016-04-29 14:13:46 -07:00
Marek Grzybek
d14d5130af feat(config): Deprecate JSHint in favor of ESLint
Add basic ESLint setup extending well-known Airbnb code style.

Fixes #1072, #1097
2016-03-15 19:11:12 +01:00
Sébastien Combéfis
d2b2dfd606 fix(docs): Fix comments content and style
Changed some bad comments referencing the Articles module in other modules.
Typo fixed in xxx.client.modules.js files ("Application" => "Applicaion")
Full stop character removed at the end of line comments
2016-01-17 11:46:11 +01:00
jloveland
33258f1314 feat(users): Supporting valid email according to HTML5 and RFC 822
Supporting valid email (i.e. root@admin) according to HTML5 and RFC 822
proposed by @jloveland

Fixes #934
2015-11-30 21:47:13 -05:00
mleanos
288f0b4e63 Solves User model validation bug
This solves the issue of the User model's pre('validate') method,
attempting to validate against a password that was not modified.

Adds the this.isModified('password') check to the condition.
2015-10-05 16:41:14 -07:00
mleanos
3d37e20128 Repeating Characters condition
Added a regular expression test to the while condition, in order to
ensure no repeat characters are present in the generated password.
2015-09-22 04:02:31 -07:00
mleanos
1c7d74298b [hotfix] Fixes db seed password bug
Fixes the database seeding bug with the password not passing the owasp
test.

Adds a UserSchema static method that generates a random passphrase that passes
the owasp test.

Performed minor refactoring of the database seed configuration to
implement the new UserSchema method.

Added model test for the UserSchema generateRandomPassphrase static method.
2015-09-22 02:23:30 -07:00
jloveland
1fd6bb6119 adding stronger password requirements for improving security based on OWASP 2015-09-07 22:11:02 -04:00
almegdad
aafa5e69cf Force Lowercase & Remove Sensitive Data
* add directive to force username & email lowercase
* remove sensitive data in password reset
* 2 space indentation  in reset & forgot password views
2015-09-01 21:09:20 +03:00
mleanos
bbbe8772f2 Admin Users require role
These changes make the role field required in the User model. Changes to
the Admin user edit view were added to provide validation for the role
field.

As an added enhancement, the user's roles are displayed in the Admin
user list view.
2015-08-28 17:41:13 -07:00
Cody B. Daig
5c287f583b [fix] Was storing a 6 char password in plain text [fixes #829] 2015-08-20 09:26:07 -07:00
Andrew Throener
d319f9203f Initial commit to return /client to the URL include paths
Conflict Resolve

Fixed Karma testing

Added back cacheIDFromPath as I am not sure what that does.  Just removed the replaceing of /client
2015-08-13 11:07:02 -05:00
Ryan Hutchison
ef3a3f9548 formatting reboot (space-2 and consistency)
JSCS fixes

update editorconfig
2015-07-31 10:04:02 -04:00
Igor Freire
5d4d7cecfe Make emails unique
Emails are made unique. When user attempts to sign in through a provider in which his email is one that is already registered, user is redirected to the signin page with an error passed as a query string parameter.
2015-07-17 14:52:27 -03:00
git-admin
a23290b46e Use validator.js for email validation 2015-07-17 09:27:16 +02:00
Liran Tal
bf79c17bd0 updating the schema save pre hook so that it checks for a modified version of the password field before it tries to re-calculate the new password to save for the user model 2015-07-12 19:25:40 +03:00
Liran Tal
67e96a4f22 0.4.0 branch merged into master 2015-07-02 12:08:09 +03:00
Rupert Muchembled
08f1750d94 Correctly encode and decode password salt
The user password salt should be encoded with Base64 before being saved
to the database.

The current code adds an unecessary step of converting the result of
crypto.randomBytes() (which already returns a SlowBuffer) to a Base64
string and back again to a Buffer, and misses the final step of
converting the Buffer's bytes back to a Base64 string.

Because of this, the salt stored in the database is garbled. This is
inconvenient when manipulating the data in a terminal or text editor.

When generating the password hash, the crypto.pbkdf2Sync() method
creates a new Buffer directly from the data supplied. Due to the
incorrect encoding of the salt, entropy is lost at this step,
weakening the security of stored passwords against brute force attacks.
2015-03-07 22:10:38 +00:00
Christian Berendt
4879a8ea2a Remove executable bit when not necessary
The executable bit is set for a lot of files where it is not necessary
to have the executable bit set. This PR removes the executable bit from
those files.
2015-02-16 14:19:56 +01:00
Amos Haviv
ab81d61bd3 New 0.4 version 2014-11-10 23:12:33 +02:00