Commit graph

829 commits

Author SHA1 Message Date
phot0n
7d5262f5e0 chore: translate authorization message and add nosemgrep 2022-07-13 12:50:04 +05:30
phot0n
31c5f260d7 chore: use f-strings 2022-07-13 12:29:25 +05:30
phot0n
01a1860491 fix(ux): better ux for successful oauthorization 2022-07-13 12:05:46 +05:30
phot0n
5b7d37477e chore: add link for google settings when throwing error 2022-07-13 12:05:46 +05:30
phot0n
8b38fcb438 chore: move getting site address to GoogleOAuth 2022-07-13 12:05:46 +05:30
phot0n
484758d6e0 chore: remove additional/unnecessary set_value calls 2022-07-13 12:05:46 +05:30
phot0n
6848c93770 chore: remove GET method whitelisting from google integrations 2022-07-13 12:05:46 +05:30
phot0n
ab9a577474 minor: better oauth flow 2022-07-13 12:05:46 +05:30
phot0n
221423c718 chore: added docstrings 2022-07-13 12:05:46 +05:30
phot0n
07a577af86 feat: google oauth for google emails
* used unique constraint on email_id in Email Account Doctype
2022-07-13 12:05:46 +05:30
phot0n
26dd606831 refactor: GoogleOAuth
* refactor: single callback method for google oauth
2022-07-13 12:05:46 +05:30
Ankush Menat
d5820213f0 feat: preview Webhook request data 2022-07-11 18:26:57 +05:30
Ankush Menat
1531e36004 fix: allow JSON array as request body 2022-07-11 18:26:54 +05:30
Ankush Menat
d4fe142674 fix(UX): correctly validate python condition 2022-07-11 18:26:54 +05:30
Suraj Shetty
d4166dbe20 refactor: Replace html2text with markdownify 2022-07-06 08:23:14 +05:30
Ankush Menat
261fbfcd11
Revert "fix(doc)!: Always cast datetime, date and time fields"
Revert "fix(doc)!: Always cast datetime, date and time fields (#15891)"

This reverts commit d7789ab6ff.
2022-07-05 13:43:32 +05:30
Himanshu
d7789ab6ff
fix(doc)!: Always cast datetime, date and time fields (#15891)
### BREAKING CHANGE
#### Datetime, Date and Time fields will always be cast to respective objects in `setattr`, this will ensure uniformity while accessing the values, no more `getdate`, `get_datetime`, `to_timedelta` wrapper.
- While importing data, the framework does check for `set_only_once`.
- In normal case scenarios, this will work flawlessly since most date fields might not be set_only_once.
- But in Subscription, the date field is set to `set_only_once` and in `after_insert`, `document.save` is called, and while doing so, `set_only_once` is checked [here](1944a547f9/frappe/model/document.py (L566)).
-This works fine if the data imported is in the correct format.
- If the date's data is not in the correct format, the framework throws an error.
- for eg `06-02-2022 00:00:00 != 06-02-2022`
- fixes [Issue/#15370](https://github.com/frappe/frappe/issues/15370)

> no-docs
2022-07-05 07:07:16 +00:00
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
96b3ee4dc3 fix(webhook): Unbound 'r' through request timeout
Errors like `requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='httpbin.org', port=443): Read timed out. (read timeout=5)`

ref: https://github.com/frappe/frappe/runs/7126891200?check_suite_focus=true
2022-06-30 13:36:08 +05:30
Ankush Menat
d35d7ffbe2 fix: remove bare exception catching
A bare except catches lots of things (like generator iteration end) and should never be used.
2022-06-28 18:05:00 +05:30
Gavin D'souza
80b19a6031 fix: Cast singles_dict' values
This is to adapt with the changes made in frappe.db.get_singles_dict in
the previous commit
2022-06-15 10:40:26 +05:30
Gavin D'souza
7e25cc4568 perf: Login Page
Improves performance 3x - from 0.047s to 0.017s

* Use frappe.get_*_settings to query table once
* Use cached LDAP Settings' document via get_ldap_client_settings
* Use single get_all to query all Social Login providers and related
  data
* Skip provider if client_secret doesn't exist
2022-06-13 18:39:56 +05:30
Ankush Menat
d1938ee271
perf: remove naming series from log-like doctypes (#16823)
- webhook request log
- access log
2022-05-04 10:54:52 +05:30
mergify[bot]
ee40bda491
Merge pull request #16602 from resilient-tech/int-req
refactor: Integration Request
2022-05-02 12:49:27 +00:00
Rucha Mahabal
693a6a7789 fix: frappe.log_error arguments while capturing razorpay payment failures 2022-05-01 11:34:08 +05:30
Rushabh Mehta
248c3555e3 fix(minor): add error_log for failed webhooks and web pages 2022-04-20 15:16:44 +05:30
Sagar Vora
31440f0538 refactor: Integration Request 2022-04-13 13:37:20 +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
ChillarAnand
b2fc959307 refactor: Clean up whitespace & add CI check 2022-02-25 20:01:29 +05:30
gavin
63e035923b
chore: Simplify ldap_custom_group_search resolution 2022-02-24 13:34:57 +05:30
Benedict Allerberger
7da85353c7 fix: format of ldap_settings.py 2022-02-23 15:22:57 +01:00
Benedict Allerberger
c775ca1d1d
feat(minor): Add Custom Group Search for custom LDAP servers 2022-02-21 12:42:56 +01:00
Benedict Allerberger
4fb22d0f34
fix: broken validation for custom LDAP server 2022-02-16 22:23:27 +01:00
tundebabzy
38caf3bb22
fix(File): Handle file_path is None (#15552)
* fix: S3 automatic backup fails when the backup folder is empty

* Removed conditional that returns early when
`file_path` argument is invalid i.e `None` or empty string.

This means though that the function will throw an exception if it
receives such invalid input so devs should check their inputs before
calling the function

Co-authored-by: Mohammad Hasnain Mohsin Rajan <hasnain2808@gmail.com>

Co-authored-by: Mohammad Hasnain Mohsin Rajan <hasnain2808@gmail.com>
2022-01-27 13:29:43 +05:30
Shariq Ansari
94869e8e69 fix: updated standard workspace json files 2022-01-13 18:40:36 +05:30
Rohan Bansal
10c5e732a5 fix: allow longer authorization URIs 2022-01-07 17:54:28 +05:30
Christoph Kappel
c99e576e1b fix: offer all (also modern) supported tls versions (PROTOCOL_TLS_CLIENT [1]) to LDAP endpoints instead of only (deprecated) PROTOCOL_TLSv1 [2]
Background: Currently, when connecting to a ldap backend, ssl.PROTOCOL_TLSv1 [2] is offered as only option to the backend.

This leads to following issues:
- LDAP Backends that do not support TLSv1.0 (because of security reasons [3]) cannot be used in ERPNext
- erpnext can ONLY connect to LDAP Backends offering the insecure [3] TLSv1.0 protocol  (see ldap_settings.py ln: 61, 63)

With this change to ssl.PROTOCOL_TLS_CLIENT we allow erpnext customers to configure LDAP Backends that also support more modern/secure (TLSv1.2 and up) transport
while still ensure backwards compatibility and allowing TLSv1.0,
since ssl.PROTOCOL_TLS "Auto-negotiates the highest protocol version that both the client and server support" [1]

[1]: https://docs.python.org/3/library/ssl.html#ssl.PROTOCOL_TLS_CLIENT
[2]: https://docs.python.org/3/library/ssl.html#ssl.PROTOCOL_TLSv1
[3]: https://tools.ietf.org/id/draft-ietf-tls-oldversions-deprecate-02.html
2022-01-04 16:52:55 +01:00
Raffael Meyer
829475a98d
fix: don't run webhook in migrate 2021-12-25 22:53:17 +01:00
Jannat Patel
7771e0b2c9 fix: removed unused imports 2021-11-09 14:49:27 +05:30
Jannat Patel
845c589497 test: ignore permissions 2021-11-09 14:33:41 +05:30
Jannat Patel
08faf731e0 test: github login 2021-11-09 13:38:17 +05:30
Jannat Patel
88d8c1e56a fix: public info api 2021-11-08 20:17:07 +05:30
Jannat Patel
f3f01d1978 fix: github api endpoint 2021-11-03 14:58:16 +05:30
Shariq Ansari
0dfc5989fd
Merge branch 'frappe:develop' into wspace-code-cleanup 2021-10-19 20:16:33 +05:30
Sagar Vora
c560d67a57 fix: remove/update older whitelist calls 2021-10-18 16:47:11 +05:30
Shariq Ansari
6839f6b4db
Merge branch 'frappe:develop' into wspace-code-cleanup 2021-10-11 16:35:34 +05:30
Shridhar Patil
34f93330e9
fix: Missing save doc. 2021-09-29 16:24:47 +05:30
Shariq Ansari
5d00602f06 fix: Removing unused code for worspace 2021-09-20 21:27:14 +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
Gavin D'souza
ebc220db39 refactor(tests): frappe.db.delete > frappe.db.sql
Use frappe.db.delete wherever possible. Get rid of all the frappe.db.sql ;)
This commit focuses on the tests written under the doctype specific
tests
2021-08-19 19:50:48 +05:30