Commit graph

16 commits

Author SHA1 Message Date
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Leela vadlamudi
3f212fbc7a
Merge pull request #14087 from shadrak98/rate-limiting
feat: Introduce rate-limiting for web forms
2021-09-21 08:07:26 +05:30
shadrak gurupnor
b057a07259 fix(minor): code clean up 2021-09-15 16:07:03 +05:30
shadrak gurupnor
851778e561 fix(minor): sider issues 2021-09-15 07:41:03 +05:30
shadrak gurupnor
930dddc558 fix: test cases for web forms 2021-09-14 21:19:27 +05:30
shadrak gurupnor
5343b28ab5 fix: expiry was not setting on key 2021-09-09 22:35:32 +05:30
shadrak gurupnor
5cc437aa6b feat: made key optional and added IP flag 2021-09-07 19:45:00 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
shadrak gurupnor
f3bc29cbdc feat: applied rate-limiting on web-forms to avoid bulk submission 2021-09-01 21:03:55 +05:30
Suraj Shetty
9781fb758f fix: Rate limiter to allow kwargs 2021-08-20 22:06:50 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
leela
de210260a7 refactor: allow callable limit arg for ratelimit deco
As we make all configurations editable through dashboard(ex: password_reset_limit), it makes sense
to provide limit as a callable so that it can be accessed dynamically.
2021-03-09 13:59:49 +05:30
leela
ba16e4737b refactor: rate limiter decorator added
We have rate limiter for reset passowrd alone and it is not re-usable
for other endpoints. Added a generic rate limiter decorator that can be
used for any endpoint.
2021-03-09 13:53:00 +05:30
Aditya Hase
aef567fdde fix(rate-limiter): Remove duplicate headers 2020-05-13 13:45:55 +05:30
Aditya Hase
ba7227ab08 feat: Rate Limiter 2020-05-13 12:34:07 +05:30