Commit Graph

4488 Commits

Author SHA1 Message Date
David Glasser
3665b31a82 Remove backwards-compatibility implementation of pre-0.6.5
Package.register_extension API.

It didn't even actually work for producing JavaScript files (eg a
coffeescript-like package): see #1410. Package maintainers should have upgraded
to the more powerful 0.6.5 API by now anyway.
2013-09-12 13:55:15 -07:00
David Winterbottom
a174b549b9 Correct typo in install script error message 2013-09-12 12:31:54 -07:00
Andrew Wilcox
4714f892f5 Check that the argument to EJSON.parse is a string.
Some Android browser versions of JSON.parse can crash when passed null
(https://code.google.com/p/android/issues/detail?id=11973), so it's
better not to pass on a non-string argument to JSON.parse.

Thanks to @raix for raising the issue in #1401.
2013-09-12 12:13:15 -07:00
Emily Stark
00a70b7899 Update History.md for token deletion 2013-09-11 13:48:05 -07:00
Emily Stark
aaf6c8a28a Merge branch 'expire-tokens' into devel 2013-09-11 13:44:58 -07:00
Emily Stark
0bc4bc9c26 Clean up token deletion and tests. 2013-09-11 13:44:27 -07:00
Emily Stark
d9093d6cf8 Test for logging out a user's connections when deleted.
Tests are flaky, not sure why yet.
2013-09-11 13:44:14 -07:00
Emily Stark
4ebdbd9f77 On logout, disassociate connection from token before deleting token. 2013-09-11 13:44:13 -07:00
Emily Stark
dab6df0eb9 Remove DDP disconnected message.
Instead, using a friendlier error message for bad login tokens, and preferring
localStorage tokens to the result of login method in onReconnect (since
onReconnect doesn't get cleared because we don't have a disconnected message to
know when to clean it). Also tried to make tests a little cleaner.
2013-09-11 13:44:13 -07:00
Emily Stark
09ba59c50b Close users' connections when they or their tokens are deleted. 2013-09-11 13:44:13 -07:00
Emily Stark
21dd57c95d Allow DDP client to register onDisconnect callback.
accounts-base uses this to handle disconnects due to users being intentionally
logged out.
2013-09-11 13:44:13 -07:00
Emily Stark
e84f0adb78 Add test for Meteor._logoutAllOthers.
Fix bugs to make it work.
2013-09-11 13:44:13 -07:00
Emily Stark
10d49451d9 Add experimental "disconnected" DDP message.
Client uses this to unset user id when a forced logout happens.
2013-09-11 13:44:13 -07:00
Emily Stark
8621c18bc1 Add token expiration test and fix bugs so it passes.
Also make all token-expiration-related times configurable via Accounts.config.
2013-09-11 13:44:13 -07:00
Emily Stark
2ebdeb0d95 Make token expiration times configurable via Accounts.config. 2013-09-11 13:44:13 -07:00
Emily Stark
d84334a34b Make client aware of token expiration times.
accounts-password will not try to auto-login with (and will clear) a login token
that is going to expire within an hour, to try to avoid abrupt disconnects from
an expiring token. Login handlers return a new tokenExpires field to help the
client do this. Made tokenExpires a separate field on the login handlers' result
object instead of just returning the whole token (token + when fields) in the
result to avoid breaking code that assumes that login handlers return a string
as the token field. The tokenExpires field is optional, so other login handlers
that don't set it aren't broken.
2013-09-11 13:44:13 -07:00
Emily Stark
d39726d737 Store login token on livedata session.
Allows us to remove sessions from sessionsByLoginToken when they are destroyed.
2013-09-11 13:44:13 -07:00
Emily Stark
1887d6960b Expire login tokens periodically.
When a login token expires, all open connections associated with that token will
be closed. It will be up to client code to avoid trying to connect with a login
token that is set to expire soon.
2013-09-11 13:44:13 -07:00
Emily Stark
4b7f052ce0 Wait 10 seconds before closing other logged-in sessions.
Gives other tabs sharing a token with the caller time to find the new token in
localStorage. This is sort of a hack for now; one possibility for making it less
hacky is to add a DDP disconnect message to allow the server to tell clients
that they are being disconnected but can reconnect with the provided token.
2013-09-11 13:44:13 -07:00
Emily Stark
12c0d8ef5e Rename to Meteor._logoutAllOthers 2013-09-11 13:44:12 -07:00
Emily Stark
3403b31c42 Preserve the connection that called logoutAll. 2013-09-11 13:44:12 -07:00
Emily Stark
7dfff264a3 Add method that logs the user out everywhere.
Might need some UI work; currently causes confusing error message "Couldn't find
login token."
2013-09-11 13:44:12 -07:00
Emily Stark
afa8afd9a9 Keep track of open DDP connections by login token. 2013-09-11 13:44:12 -07:00
Andrew Wilcox
ba34b2550b Chrome for iOS supports the appcache 2013-09-04 16:31:52 -07:00
Emily Stark
1c8a5169ed Merge pull request #1387 from peerlibrary/wrapasync-err
Check for err.stack in logErr in wrapAsync
2013-09-01 19:06:22 -07:00
Mitar
e082d9745a Check for err.stack in logErr in wrapAsync. 2013-08-31 10:03:41 -07:00
Nick Martin
9c53643113 Merge branch 'master' into devel
Conflicts:
	History.md
	docs/client/docs.js
2013-08-28 14:16:31 -07:00
Nick Martin
bb6c88ca9e Merge branch 'release-0.6.5.1' 2013-08-28 14:14:44 -07:00
Nick Martin
16b8f0b0b6 update examples for 0.6.5.1 2013-08-28 14:13:09 -07:00
Nick Martin
5d4849d361 bump docs version too. eventually this won't be needed. 2013-08-27 20:28:56 -07:00
Emily Stark
cdb6f90b66 Bump docs version to latest galaxy 2013-08-27 20:28:09 -07:00
Nick Martin
61f84eb7e7 banner and notices for 0.6.5.1 2013-08-27 20:17:59 -07:00
Nick Martin
fab6f3fe5d First pass at history for 0.6.5.1 2013-08-26 20:30:41 -07:00
David Glasser
6a4216f16f Fix doc on how to get correct fibers. release/0.6.5.1 release/0.6.5.1-rc1 2013-08-26 19:51:39 -07:00
Geoff Schmidt
f6b0bab517 Docs: CoffeeScript namespacing, other tweaks 2013-08-26 19:51:39 -07:00
Nick Martin
0e70184fd0 fix typo. 2013-08-26 19:51:39 -07:00
Emily Stark
bab5c1685d Fix docs typo.
Fixes #1297
2013-08-26 19:51:39 -07:00
Nick Martin
7f73833991 Fix typo in package description. 2013-08-26 19:51:39 -07:00
Nick Martin
61d9510ef1 Export Spiderable symbol, so people can override user agents. Also add twitterbot to agents. Fixes #1300. 2013-08-26 19:51:39 -07:00
Emily Stark
2c68882fff Fix d3 tab character 2013-08-26 19:51:38 -07:00
David Glasser
99d29cc9d2 More comments on idStringify fix. 2013-08-26 19:51:38 -07:00
David Glasser
9847720a3b Various bugs involving idStringify.
In minimongo, we support various types as _id fields; the most important are
strings and ObjectIds. We have a special encoding that we use when we need to
represent them as strings, but we had a few bugs with using it.

minimongo: The duplicate-ID check in insert needed to check using the encoded
string.

spark OrderedDict: due to linker changes, it was not successfully finding
LocalCollection._idStringify, and so it fell back to the identity
function. Fixed to use weak dependencies. Also, later refactorings have removed
the need for idStringify(null) === null so that special case is removed.

spark branch labels: use idStringify in various places where _id is used as a
branch label.
2013-08-26 19:35:41 -07:00
Emily Stark
70a691661d Use decoded pathnames in staticFiles keys.
Fixes #1339
2013-08-26 19:34:39 -07:00
Nick Martin
a79db877a4 Add EJSON to standard-app-packages. Fixes #1343. 2013-08-26 19:34:32 -07:00
Emily Stark
5784c811ae Don't number lines that end in backslash.
Fixes #1326
2013-08-26 19:34:24 -07:00
David Greenspan
6b9bfe8b5a update esprima to take fix for regex parsing bug 2013-08-26 19:34:19 -07:00
Nick Martin
c4203e3500 Fix typo in package description. 2013-08-26 19:28:25 -07:00
Emily Stark
c4f52b7551 Update docs for Date types on createdAt fields. 2013-08-21 15:19:05 -07:00
Emily Stark
d8364af765 Merge branch 'mongo-dates' into devel 2013-08-21 14:30:05 -07:00
Emily Stark
aa291537a4 Update tests for new Date fields on user docs 2013-08-21 14:28:50 -07:00