Commit Graph

1920 Commits

Author SHA1 Message Date
Miroslav Bajtoš 01e2e61cfe Merge pull request #3660 from strongloop/drop/node-0x
Drop support for Node.js versions 0.10 and 0.12
2017-10-23 09:20:37 +02:00
Miroslav Bajtoš 538bc9a7d5
Drop support for Node.js versions 0.10 and 0.12
Some of our dependencies are no longer supporting pre-4.0 versions of
Node.js. As a result, our CI builds are failing on these platforms.

This pull request removes 0.10 and 0.12 from our Travis CI build matrix
and also adds "engines" field to package.json to tell our internal
Jenkins CI to stop testing 0.10 and 0.12 versions too.
2017-10-19 16:47:53 +02:00
Miroslav Bajtoš 566caa9bab Merge pull request #3655 from strongloop/fix/build-2x
test: fix too strict test assertion
2017-10-19 16:47:01 +02:00
Miroslav Bajtoš 4f928bf965
test: fix too strict test assertion
Rework the test verifying properties of `loopback` to ignore
new express properties added after the test was written.

Ignore "json" and "urlencoded" middleware that was added back
to Express, keep using our wrappers printing a deprecation message.
2017-10-17 14:16:20 +02:00
Loay cd8f1775bc Merge pull request #3481 from strongloop/empty_password
Add unit test for empty password
2017-07-21 16:52:39 -04:00
loay 22bd0fc81f Add unit test for empty password 2017-07-21 15:46:21 -04:00
Candy 0fdca8ee0d Merge pull request #3419 from kallenboone/piiReturn_2.x
Update translated strings [PII Return Q2 2017]
2017-05-23 14:43:14 -04:00
Allen Boone 41c31118d8 Update translated strings Q2 2017 2017-05-23 13:02:39 -04:00
Candy 2135abc1db 2.38.3
* use lower version of karma-browserify (Diana Lau)
 * update karma-browserify to 5.x (Diana Lau)
 * update translation msg (Diana Lau)
 * Fix user-literal rewrite for anonymous requests (Aaron Buchanan)
 * Forward options in prepareForTokenInvalidation (Miroslav Bajtoš)
2017-04-17 16:40:50 -04:00
Diana Lau 661d62e817 Merge pull request #3346 from strongloop/update-dependencies
[2.x] Update deprecated dependencies
2017-04-17 18:03:29 +00:00
Diana Lau f1f9aab606 use lower version of karma-browserify 2017-04-13 15:28:48 -04:00
Diana Lau 645d5c615b update karma-browserify to 5.x
update karma-browserify to 5.x
2017-04-12 10:43:22 -04:00
Diana Lau 62d6ecb9d2 Merge pull request #3354 from strongloop/update-msg
[2.x] update translation msg
2017-04-12 14:07:02 +00:00
Diana Lau 1ec7a265a7 update translation msg 2017-04-11 14:36:41 -04:00
Miroslav Bajtoš cf38c62c00 Merge pull request #3330 from strongloop/fix/unauthorized-current-user-literal-2x
Fix user-literal rewrite for anonymous requests
2017-04-04 19:26:45 +02:00
Aaron Buchanan 50e0e4808a
Fix user-literal rewrite for anonymous requests
Currently any `currentUserLiteral` routes when accessed with a bad
token throw a 500 due to a SQL error that is raised because
`Model.findById` is invoked with `id={currentUserLiteral}`
(`id=me` in our case) when the url rewrite fails.

This commit changes the token middleware to return 401 Not Authorized
when the client is requesting a currentUserLiteral route without
a valid access token.
2017-04-04 18:55:34 +02:00
Miroslav Bajtoš ac2462e11d Merge pull request #3309 from strongloop/fix/options-in-token-invalidations
Forward options in prepareForTokenInvalidation
2017-03-28 15:46:59 +02:00
Miroslav Bajtoš a5ac1506e6
Forward options in prepareForTokenInvalidation 2017-03-24 15:01:05 +01:00
Raymond Feng 78161ccd9b 2.38.2
* Fix file patch (Raymond Feng)
 * Add nyc coverage, report data to coveralls.io (Miroslav Bajtoš)
2017-03-17 08:54:26 -07:00
Raymond Feng cfb0148e53 Fix file patch 2017-03-17 08:46:35 -07:00
Miroslav Bajtoš 85c81f760c Merge pull request #3280 from strongloop/coveralls-2x
Add nyc coverage, report data to coveralls.io
2017-03-14 14:20:40 +01:00
Miroslav Bajtoš 4713e5e7ea
Add nyc coverage, report data to coveralls.io 2017-03-14 13:42:15 +01:00
Miroslav Bajtoš 45284c3bf9
2.38.1
* Fix User.verify to convert uid to string (phairow)
 * Configure Travis CI to cache phantomjs binaries (Miroslav Bajtoš)
 * Improve "filter" arg description (Raymond Camden)
 * Fix creation of verification links (Miroslav Bajtoš)
 * Include link to docs in logoutSessions warning (Miroslav Bajtoš)
 * Fix detection of logoutSessionsOnSensitiveChanges (Miroslav Bajtoš)
 * Preserve sessions on User.save() making no changes (Miroslav Bajtoš)
 * Remove unused dependencies (Miroslav Bajtoš)
 * Fix logout to handle no or missing accessToken (Ritchie Martori)
 * Use English when running Mocha tests (Miroslav Bajtoš)
 * Role model: resolves related models by name (Benjamin Kroeger)
 * Fix User methods to use correct Primary Key (Aris Kemper)
2017-03-13 16:22:17 +01:00
Miroslav Bajtoš 989c3bba1f Merge pull request #3259 from strongloop/backport/fix-verifyHref-uid
Fix User.verify to convert uid to string
2017-03-09 08:57:02 +01:00
phairow 91502db9f1
Fix User.verify to convert uid to string
Applications using MongoDB connectors typically have `user.id`
property of type ObjectID.

This commit fixes the code building the verification URL to
correctly convert the user id value into string.
2017-03-08 16:30:01 +01:00
Miroslav Bajtoš 10fddb64f7 Merge pull request #3222 from strongloop/backport/cache-phantomjs-on-travis
Configure Travis CI to cache phantomjs binaries [2.x]
2017-02-23 11:52:48 +01:00
Miroslav Bajtoš e334884fb1
Configure Travis CI to cache phantomjs binaries
This should speed up our CI builds and also save a lot of bandwidth
for people providing phantomjs-prebuilt module.

See also
https://www.npmjs.com/package/phantomjs-prebuilt#continuous-integration
2017-02-22 15:34:28 +01:00
Miroslav Bajtoš 68d55b523e Merge pull request #3219 from strongloop/backport/fix-filter-desc
Improve "filter" arg description
2017-02-21 17:28:51 +01:00
Raymond Camden a4154caf59
Improve "filter" arg description
Add an example showing how to serialize object values as JSON.
2017-02-21 15:00:57 +01:00
Miroslav Bajtoš 42780567a8 Merge pull request #3195 from strongloop/backport/fix-hash-path-in-redirect
Fix creation of verification links
2017-02-09 15:20:52 +01:00
Miroslav Bajtoš 09b1fce34b Fix creation of verification links
Fix User.prototype.verify to call `querystring.stringify` instead
of concatenating query-string components directly.

In particular, this fixes the bug where `options.redirect` containing
a hash fragment like `#/home?arg1=value1&arg2=value2` produced incorrect
URL, because the `redirect` value was not correctly encoded.
2017-02-09 13:33:57 +01:00
Miroslav Bajtoš 4e8252afad Merge pull request #3193 from strongloop/add-doc-url-for-logoutSession
Include link to docs in logoutSessions warning
2017-02-09 13:30:12 +01:00
Miroslav Bajtoš 8c76d7fc01 Include link to docs in logoutSessions warning 2017-02-08 09:02:39 +01:00
Miroslav Bajtoš 322f6c12bb Merge pull request #3167 from strongloop/backport/fix-token-invalidation-on-save
Preserve sessions on User.save() making no changes
2017-01-31 16:46:09 +01:00
Miroslav Bajtoš 0cc2b5b8db Fix detection of logoutSessionsOnSensitiveChanges
Modify the code detecting whether logoutSessionsOnSensitiveChanges
is enabled to correctly handle the case when the model is not attached
to any application, as is the case with loopback-component-passport
tests.
2017-01-31 15:53:41 +01:00
Miroslav Bajtoš 05db4337cf Preserve sessions on User.save() making no changes 2017-01-31 14:43:24 +01:00
Miroslav Bajtoš 50743e94be Merge pull request #3162 from strongloop/remove-unused-deps
Remove unused dependencies
2017-01-31 09:29:15 +01:00
Miroslav Bajtoš 6a4198896f Remove unused dependencies
- strong-error-handler
 - eslint

These dependencies were most likely added accidentally by fea3b781.
2017-01-30 15:09:59 +01:00
Miroslav Bajtoš 03391f7b00 Merge pull request #3158 from strongloop/backport/fix-logout-without-token
Fix logout to handle no or missing accessToken
2017-01-30 11:03:39 +01:00
Ritchie Martori 1dac9ada0b Fix logout to handle no or missing accessToken
Return 401 when the request does not provide any accessToken argument
or the token was not found.

Also simplify the implementation of the `logout` method to make only
a single database call (`deleteById`) instead of `findById` + `delete`.
2017-01-30 10:39:40 +01:00
Miroslav Bajtoš 2ade55ec03 Merge pull request #3148 from strongloop/backport/fix-language-in-tests
Use English when running Mocha tests
2017-01-27 13:10:49 +01:00
Miroslav Bajtoš 98110f1b84 Use English when running Mocha tests 2017-01-27 11:26:24 +01:00
Miroslav Bajtoš 97f96f4ab8 Merge pull request #3135 from strongloop/backport/fix-role-models-resolution
Role model: resolve related models by name
2017-01-25 16:23:48 +01:00
Benjamin Kroeger 56ad85ae2a Role model: resolves related models by name
Resolve models related to the `Role` model by name instead of class.
2017-01-25 11:02:55 +01:00
Miroslav Bajtoš b2a00286a3 Merge pull request #3129 from strongloop/backport/fix-user-id
Fix User methods to use correct Primary Key
2017-01-23 10:59:11 +01:00
Aris Kemper 5e7e7ca7e9 Fix User methods to use correct Primary Key
Do not use hard-coded "id" property name, call `idName()` to get the
name of the PK property.
2017-01-23 09:51:41 +01:00
Miroslav Bajtoš 6fcb7dba6a 2.38.0
* Add app setting logoutSessionsOnSensitiveChanges (Miroslav Bajtoš)
 * Fix User.resetPassword to call createAccessToken() (João Ribeiro)
2017-01-20 15:10:26 +01:00
Miroslav Bajtoš b541c5bff8 Merge pull request #3109 from strongloop/fix/flag-to-invalidate-tokens
Add app setting logoutSessionsOnSensitiveChanges
2017-01-20 15:09:08 +01:00
Miroslav Bajtoš f1e31ca50c Add app setting logoutSessionsOnSensitiveChanges
Disable invalidation of access tokens by default to restore backwards
compatibility with older 2.x versions.

Add a new application-wide flag logoutSessionsOnSensitiveChanges
that can be used to explicitly turn on/off the token invalidation.

When the flag is not set, a verbose warning is printed to nudge the user
to make a decision how they want to handle token invalidation.
2017-01-20 12:57:23 +01:00
Miroslav Bajtoš f355f66114 Merge pull request #3123 from strongloop/backport/fix-user-reset-password
Fix User.resetPassword to call createAccessToken()
2017-01-20 12:55:21 +01:00