Commit graph

267 commits

Author SHA1 Message Date
Sagar Vora
51a39bd693 fix: only set allowed headers if required 2022-09-05 02:10:58 +05:30
Sagar Vora
23e8924a05 refactor: improved CORS support and caching 2022-09-04 20:20:08 +00:00
Ankush Menat
f5b8e5f015
perf: short-circuit guest connection and basic perf tests (#17988)
* perf: reorder condition to avoid redis call

* test: basic perf tests
2022-08-30 16:30:25 +05:30
Sagar Vora
eea2616aac style: use middleware decorator to keep function definition intact 2022-07-19 22:28:14 +05:30
Ankush Menat
e9a9496ebc fix: duplicate tracebacks in console 2022-07-04 11:25:47 +05:30
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
Gavin D'souza
56d97da32e fix: commit after processing request of "unsafe" http method
ref: https://developer.mozilla.org/en-US/docs/Glossary/safe
2022-06-08 12:03:38 +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
Sagar Vora
951ad3f844 chore(deps): bump werkzeug to latest version 2022-02-08 20:02:49 +05:30
Faris Ansari
b632cc558b fix: remove unnecessary array transformation in request args
`key: ['value', 'value2']` is turned into `key: 'value'` for no reason
2022-01-28 18:47:57 +05:30
Suraj Shetty
fba15b3874 fix: Combine request args and form data
- To accept argument via both way in a single request
2021-12-14 13:55:24 +05:30
Mitul David
648d24eca5 refactor: Limit file size of uploads by setting max_content_length 2021-11-17 16:26: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
Suraj Shetty
2d8c6c1710 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-06-03 11:43:28 +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
Suraj Shetty
9a3d280484 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-13 14:23:20 +05:30
Suraj Shetty
b39b5effbf Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-11 10:38:04 +05:30
Gavin D'souza
b1d2e24892 refactor(minor): Move logging code in seperate function 2021-05-06 19:18:23 +05:30
Leela vadlamudi
3875004d7e
Merge pull request #13057 from leela/email-refactoring
refactor: Email Module - 1
2021-05-05 11:45:04 +05:30
Sagar Vora
e288b781bf fix: add docstring 2021-05-03 18:00:37 +05:30
Sagar Vora
b214a993da fix: disable reloading files in __pycache__ directory 2021-05-03 17:54:13 +05:30
leela
a8f74d9471 refactor: Move finding email accounts code to EmailAccount doctype 2021-05-03 06:22:35 +05:30
Gavin D'souza
fcf63622bc fix: Respond to /api requests as JSON by default
If header 'Accept: application/json' isn't set, the failure
responses to /api endpoints is HTML. Success responses are of type JSON.
2021-04-29 11:27:15 +05:30
Suraj Shetty
87fa672250 style: Resolve code correctness warning 2021-04-28 15:03:14 +05:30
Suraj Shetty
e18a43e11d fix: Replace render() with get_response 2021-04-28 12:51:36 +05:30
Suraj Shetty
f50cb61888 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-04-26 12:52:23 +05:30
leela
d8d86f7498 refactor: enable profiler from env variable 2021-04-26 06:24:03 +05:30
Revant Nandgaonkar
1d0e72834d fix: remove unused imports 2021-04-19 15:54:16 +05:30
Suraj Shetty
f74b3916b6
Merge branch 'develop' into refactor-website 2021-03-10 11:03:14 +05:30
leela
b7c8e030b9 fix: Fix setting admin as user when frappe.db is not set
we are setting admin as current user, At time of request handling if
frappe.db is not set. fixed that issue by adding a check.
2021-02-22 21:45:30 +05:30
Sagar Vora
68c6fc4a44 fix: optimise set_cors_headers 2021-02-22 18:13:30 +05:30
Faris Ansari
51bb7aa39a fix: Throw early if invalid arguments 2021-02-16 21:44:35 +05:30
Rushabh Mehta
4369b8c0dc fix(rendering): add doctype generate pages 2021-02-15 09:54:13 +05:30
Rushabh Mehta
3f38c33004 fix: status_code, login page works 2021-02-15 09:54:13 +05:30
Sagar Vora
f35e8045d9 feat: set CORS headers based on allow_cors site config 2021-01-09 14:55:55 +05:30
Rushabh Mehta
a0a3606a7f fix(tests): add test cases for custom_link and custom_action 2020-10-26 10:02:04 +05:30
Rushabh Mehta
77e79c050f fix(linting) 2020-10-26 10:02:04 +05:30
Rushabh Mehta
1e48ced097 feat(customize form): add links and actions to customize form and cleanup code 2020-10-26 10:02:04 +05:30
Faris Ansari
129eb72a2f fix: Print disabled traceback in development 2020-09-28 17:16:44 +05:30
Saurabh
435b522dbf fix: cache all apps in local and switch to enable/disable frappe logger 2020-08-10 12:31:08 +05:30
Aditya Hase
0748312e39
fix(werkzeug): Avoid duplicate lines from werkzeug in bench start logs (#11171)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-08-04 17:41:34 +05:30
Gavin D'souza
4b93f75eba fix: Log site only if exists 2020-08-03 17:23:32 +05:30
Gavin D'souza
1345c2feb3 feat: Allow_site flag in frappe.logger 2020-07-27 17:31:12 +05:30
Gavin D'souza
476e625261 fix: Add site validation for logger 2020-07-16 16:26:20 +05:30
Gavin D'souza
fe22595e85 fix: rename web.log generated by frappe to frappe.web.log to avoid
conflict with web.log file generated by gunicorn process in production
2020-06-12 19:21:08 +05:30
Gavin D'souza
a3d64fb4c5 fix: use fallback attr for web logging 2020-05-29 16:51:07 +05:30
Gavin D'souza
f71585ec74 Merge branch 'develop' of github.com:frappe/frappe into site-wise-logging 2020-05-29 14:56:29 +05:30
Gavin D'souza
746b540af8 fix: Add Form Dict information only for frappe.log 2020-05-27 19:09:18 +05:30
Aditya Hase
19e8008c3c feat(rate-limiter): Ignore requests above limit 2020-05-13 12:34:07 +05:30
Chinmay D. Pai
fd88d324dc
fix: sanitize html before rendering error
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-10 21:26:08 +05:30