Commit Graph

6871 Commits

Author SHA1 Message Date
David Glasser
43b4b30205 Release PLUGINS-PREVIEW@1
This included removing some internal version constraints. It would be
nice if package A could say "use B@2.0.0" (when both have changed), but
when they're both in the release, we need to make a release that has a
B@2.0.0-rc in it, which doesn't match that constraint. Fortunately,
constraints aren't necessary within a release anyway.
2015-07-22 23:19:11 -07:00
Avital Oliver
0d20041683 Add clarifying comment to ddp rate limit test 2015-07-22 10:49:23 -07:00
Anubhav Jain
59c0bcf1d2 Added very simple API description to Tinytest README 2015-07-22 10:14:21 -07:00
Anubhav Jain
ce84258bfd Fixed getLastRateLimitEvent mixup and updated DDPRateLimiter tests to reflect that. 2015-07-22 09:52:10 -07:00
Anubhav Jain
ba77b0f6cc Fixed a bug that prevented DDP Rate Limiter from running in IE8 due to some mysterious variable hoisting. 2015-07-22 09:52:10 -07:00
Anubhav Jain
432bc5b61b Fixed ipAddr -> clientAddress and added tests to ensure testing for existence of clientAddress 2015-07-22 09:52:10 -07:00
Anubhav Jain
ab1dc30623 Added summary to rate-limit-tests.js and fixed Tinytest formatting for ddp-rate-limiter and rate-limit tests 2015-07-22 09:52:10 -07:00
Anubhav Jain
a957e613ed Improved naming to rate limiter tests 2015-07-22 09:52:10 -07:00
Anubhav Jain
b83427e369 Updated DDPRateLimiter Tests thanks to Avi!
Modified testing to be extensible and easy to modify and more thorough
Refactored common code into ddp-rate-limiter-tests-common.js
Explicitly defined timeToReset to be passed back to user from livedata_server.js and appended to error object
2015-07-22 09:52:10 -07:00
Anubhav Jain
6a525fbea7 Updated DDPRateLimiter structure per Avi's suggestions and modified tests.
Updated documentation and default rate limit as well.
2015-07-22 09:52:10 -07:00
Anubhav Jain
759b9a2c19 Updating docs 2015-07-22 09:52:09 -07:00
Anubhav Jain
13331009d0 Making more code fixes and documentation update 2015-07-22 09:52:09 -07:00
Anubhav Jain
4cc907f7e4 Updating docs and fixing code review comments. 2015-07-22 09:52:09 -07:00
Anubhav Jain
50d3437da9 Updated comments and line sizes in markdown and rate limiter package 2015-07-22 09:52:09 -07:00
Anubhav Jain
89afc4a22a Added forgot password to default rate limit 2015-07-22 09:52:09 -07:00
Anubhav Jain
4302ad2219 Fix tests to new naming of valid-->allowed 2015-07-22 09:52:09 -07:00
Anubhav Jain
26f612cb0b Moving DDPRateLimiter to a weak dependency to minimize dependencies on DDP 2015-07-22 09:52:09 -07:00
Anubhav Jain
38fe0d41e4 Changed Rule.resetCounter to delete all keys, allowing for garbage collection 2015-07-22 09:52:09 -07:00
Anubhav Jain
ac1e0355c5 Added in per connection id rule as default, instead of per IP. Removed a console.log 2015-07-22 09:52:08 -07:00
Anubhav Jain
817ed2904e Added comments and DocBlockr api docs.
Updated DDPRateLimiter's default rule to contain password resets and create new users. Changed valid to allowed in rateLimitResult replies.
2015-07-22 09:52:08 -07:00
Anubhav Jain
39ead027dd Moved default rule adding to accounts_base and added a way to remove the default login rule. Updated ddp rate limiter server tests to test removing the default rule 2015-07-22 09:52:08 -07:00
Anubhav Jain
b54401274e Fixed Rate Limit and DDP Rate Limit packages. Added end to end tests which test removing rules. 2015-07-22 09:52:08 -07:00
Anubhav Jain
d58bf19574 Changed DDPRateLimiter.config to DDPRateLimiter.setRules, which overrides all the rules stored
in the RateLimiter. Added comments above Rule.apply to explain what it does.
2015-07-22 09:52:08 -07:00
Anubhav Jain
fc4b69272f Moved counters to each rule instead of a large dictionary per rate limiter 2015-07-22 09:52:08 -07:00
Anubhav Jain
a1db69acbc Refactored errorMessage in DDPRateLimiter 2015-07-22 09:52:08 -07:00
Anubhav Jain
c0d753c8ba Removed uncessary private_field array 2015-07-22 09:52:07 -07:00
Anubhav Jain
7a298ef0d6 Fixed changes from code review and created new Rule class.
Refactored rate-limit package to have a new rule class that organizes the rule attributes appropriately.
Moved all the Rule specific methods from RateLimiter to the Rule prototype. Reformatted code to match Meteor
code style.
2015-07-22 09:52:07 -07:00
Anubhav Jain
03f21b3bb3 Removed dead code and fixed ddp-rate-limiter package.
Cleaned up rate-limit package to remove old methods before refactor. Renamed private
variables inside rate-limit package. Updated livedata_server.js to include rate limiting
for both methods and subscriptions in their respective protocol_handlers. Currently no default
rule for subscriptions in the global DDPRateLimiter.Fixed ddp-rate-limiter tests to work as well.
2015-07-22 09:52:07 -07:00
Anubhav Jain
2fd1c35da1 Generalized rate-limit package and updated livedata_server.js to accept rules on methods and subscriptions.
Need to add checks and throw errors if wrong format / input to rate-limit package. Updated default rule in ddp-rate-limiter
to reflect new rate-limit generic design and moved the location of the DDPRateLimiter in livedata_server.js. Need to fix tests
for both ddp-rate-limiter and rate-limit packages with updated code and clean up rate-limit package.
2015-07-22 09:52:07 -07:00
Anubhav Jain
3e342e04eb Refactored rate-limit package.
Changed rate-limit package to take generic rules and match generic inputs to those rules.
Now, users can use the rate-limit package for whatever they would like. Tests still need to
be updated and need to change location of ddp-rate-limiter to include subscriptions.
Need to remove duplicate code in rate-limit from previous implementation which hardcoded DDP types
into the rate limiting package by making the input be a DDPCommon.MethodInvocation object.
2015-07-22 09:52:07 -07:00
Anubhav Jain
239f806c7d Code cleanup including 80 character limit formatting and refactoring.
Refactored rate-limit.js to remove duplicate code.
Removed commented out code and extra whitespace.
2015-07-22 09:52:07 -07:00
Anubhav Jain
9afcf90503 Fixed line wraps and some basic styling. 2015-07-22 09:52:07 -07:00
Anubhav Jain
9134542675 Updated rate-limit tests to work with setTimeout by using Meteor.setTimeout 2015-07-22 09:52:07 -07:00
Anubhav Jain
b999270ae1 Created default DDPRateLimiter and updated DDPServer to include a rate limiter.
DDPRateLimiter is a global rate limiter with a public API to add rules, set the default
error message and an option to pass in a configuration of rules. It is integrated into
DDP already to check on every method invocation.
2015-07-22 09:52:06 -07:00
Anubhav Jain
aae2d5f454 Added documentation to rate limit package and wrote more tests.
Cleaned up code in rate limit, added appropriate packages to package.js
and refactored rate limit.
2015-07-22 09:52:06 -07:00
Anubhav Jain
4a4b32597a Created a new rate limiter package with working tests and functionality 2015-07-22 09:52:06 -07:00
Ben Newman
09f67395af Fix Match pattern in babel-compiler/babel.js. 2015-07-22 10:21:32 -04:00
William Byrne
36ece1f957 Allow for multiple Accounts.onLogin callbacks on the client.
- Needed to return true in onLoginHook and onLoginFailureHook
iterators.
2015-07-21 20:44:24 -07:00
Ben Newman
b7fad6ba34 Specify version constraint for "check" package. 2015-07-21 22:11:04 -04:00
Ben Newman
155d3aef1a Make ecmascript depend on latest babel-compiler and promise packages. 2015-07-21 22:04:34 -04:00
Ben Newman
d30ffbf114 Upgrade meteor-promise NPM dependency to 0.4.1. 2015-07-21 22:03:55 -04:00
David Glasser
cc80a5fc18 Fix typo 2015-07-21 19:00:44 -07:00
Kenton Varda
72f445b1e9 Clarify docs about template inclusions + helpers
I'm not sure that this is the best way to document this, but I spent a while confused by this, so it would be nice to mention in the docs somewhere.
2015-07-21 19:00:18 -07:00
David Glasser
6789daf571 Fix stylus bugs and test it
It now runs basically the same caching test as 'less'.

The implementation has been made to be a bit more like 'less'; eg, using
empty string instead of `__app__` to mean the app, and consistently
making pathInPackage not start with a slash.
2015-07-21 18:59:15 -07:00
Ben Newman
937defa9bc Upgrade meteor-babel to 0.4.6 and thus babel-core to 5.8.3. 2015-07-21 21:57:20 -04:00
Slava Kim
b4e90047f5 fix a misuse of getPackageName in stylus 2015-07-21 17:29:57 -07:00
Slava Kim
a41dcbbd66 Add some Windows-specific paths hacks to less/stylus 2015-07-21 17:15:44 -07:00
Anubhav Jain
567db5605a Changed email text to be optional in password_server.js 2015-07-21 15:22:58 -07:00
David Glasser
d0de782d58 Update npm-shrinkwrap.json files 2015-07-21 13:45:15 -07:00
Ben Newman
b6dee683b6 Upgrade meteor-babel dependency to 0.4.5 2015-07-21 14:43:05 -04:00