Commit graph

3786 commits

Author SHA1 Message Date
Akhil Narang
36ccf32ab3
fix: don't try to scan encrypted PDFs
Also fix reversed logic of JS check

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-09-10 15:44:09 +05:30
Hussain Nagaria
268863a2b6
chore: typo in comments (#33929) 2025-09-06 10:35:38 +00:00
Raffael Meyer
3c0a378a41
refactor: prefer list patterns provided by babel (#33857)
* feat: prefer list patterns provided by babel

* test: comma_and, comma_or
2025-09-04 15:17:56 +05:30
Soham Kulkarni
b7129419ef
Merge pull request #33675 from sokumon/pdf-issue
fix: scan pdfs before uploading
2025-09-02 18:41:13 +05:30
sokumon
5e21a2e2ab fix: relax the logic 2025-09-02 14:54:55 +05:30
mergify[bot]
c7ba132315
Merge branch 'develop' into drive-integration 2025-09-01 06:14:16 +00:00
barredterra
b1c7821911 feat: validate IBAN in backend 2025-08-29 15:21:56 +02:00
sokumon
fd29103149 fix: make the checking more robust 2025-08-29 13:13:19 +05:30
sokumon
ca5831b1a8 fix: better function name, check before writing the file 2025-08-29 13:13:19 +05:30
sokumon
577ba89c28 fix(XSS): verify pdf content before uploading 2025-08-29 13:13:19 +05:30
Hussain Nagaria
b95f850f86
fix: sort file/dir names for fixtures (#33783) 2025-08-25 12:14:02 +00:00
Safwan Samsudeen
03bff35b5e chore: pre-commit 2025-08-25 13:23:32 +05:30
Safwan Samsudeen
6131aa63fd fix: allow all internal urls 2025-08-25 11:00:55 +05:30
Safwan Samsudeen
adc477f255 feat: tweak to allow drive links 2025-08-22 14:54:24 +05:30
Akhil Narang
c0c0cae78a
fix(nestedset): clear user permissions cache when a new doc is created, if applicable
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-08-13 12:54:00 +05:30
Ejaaz Khan
50ff20a12a refactor: only replace month for compatibility 2025-08-06 11:11:24 +05:30
Ejaaz Khan
6cde9a4bcc refactor: fetch time format dynamic 2025-08-05 17:30:14 +05:30
Ejaaz Khan
0e880ac318 feat: format date and datetime fields on export 2025-08-05 17:07:47 +05:30
Akhil Narang
9a94e73489
feat: add in support for _inplacevar_ (#31921)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-08-01 13:50:43 +05:30
Akhil Narang
3c4dc61b7a
Merge pull request #33437 from vehbiu/develop
fix(utils): convert phone numbers passed into validate_phone_number to strings
2025-07-28 15:43:37 +05:30
Raffael Meyer
4983c3fc34
fix: prevent logout due to empty "Password" field (#29158)
* fix: prevent logout due to empty "Password" field

* fix: validate_api_key_secret

- We don't want get decrypted password to raise a ValidationError
- If api_key, api_secret or doc_secret are empty, we want an AuthenticationError
2025-07-28 10:04:10 +05:30
Vehbi Unal
c6a2e6595a fix(utils): convert phone numbers passed into validate_phone_number to strings 2025-07-24 13:02:55 +00:00
Raffael Meyer
93b4700899
fix: make labels in error message translatable (#33166) 2025-07-23 18:11:51 +05:30
Kitti U. @ Ecosoft
74683428cf
feat: Add hook on print pdf (#33387) 2025-07-23 10:45:39 +05:30
Venkatesh M
96e0f49df4 fix: handle None session.data in maintenance mode (fixes #33258)
- Add null check for session.data in safe_exec.py
- Add null check for session.data in base_template_page.py
- Prevents AttributeError when session.data is None during maintenance mode
2025-07-19 16:02:57 +00:00
Ankush Menat
b94b6ec939 perf!: Compute safe exceptions only once 2025-07-19 19:29:27 +05:30
Ankush Menat
38365beb52 perf: Compute safe utils only once
300us -> 60us for this silly change LOL!
2025-07-19 18:49:24 +05:30
Ankush Menat
17a1244585 perf: Always use cached config for checking safe_exec
It expires in 1min anyway
2025-07-19 18:14:04 +05:30
Ankush Menat
bddc89544d perf: Cache safe_exec compilation 2025-07-19 18:04:29 +05:30
Ankush Menat
afb720e003
refactor: move stuff away from init.py (#33283)
* chore: Drop unused imports

* refactor: split translation utils from init.py

* refactor: move sendmail from init.py

* refactor: move prints to attach_print
2025-07-11 07:18:16 +00:00
Sagar Vora
e14218a671 refactor: simplify prepared_args creation, use prepared union type 2025-07-03 18:14:09 +05:30
Sagar Vora
9634fa58b0 refactor: define annotations earlier 2025-07-03 18:08:48 +05:30
Sagar Vora
f922af8001 refactor: avoid using callable as default 2025-07-03 17:30:30 +05:30
Sagar Vora
db246c0aa2 refactor: use global imports 2025-07-03 17:29:31 +05:30
Sagar Vora
fa7e9ebb75 chore: simplify TypeAdapter 2025-07-03 16:14:00 +05:30
Soham Kulkarni
0e46eb6228
fix: handle fraction units being zero (#33137)
* fix: handle fraction units being zero

* Revert "fix: handle fraction units being zero"

This reverts commit 912a031b16fb1e1951093d5b384976f4dc2968e6.

* fix: remove bad fallbacks from money_in_words

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-07-01 11:56:42 +05:30
Soham Kulkarni
e1aa789acf
Merge pull request #32971 from sokumon/newsletter-removal
refactor: seperate newsletter into app
2025-06-27 11:59:02 +05:30
Sagar Vora
2e5c8bea03 feat: frappe.utils.orjson_dumps 2025-06-26 17:37:51 +05:30
Sagar Vora
cda7699187 perf: use orjson in utils 2025-06-26 17:37:51 +05:30
Sagar Vora
b857a4099a perf: use orjson for faster request processing 2025-06-26 17:37:51 +05:30
sokumon
2b8d21d483 fix: add utm utils back 2025-06-24 18:43:28 +05:30
Sagar Vora
ae78eb5458 chore: remove old unused cache 2025-06-24 16:52:46 +05:30
Faris Ansari
d584b8691d
Merge pull request #32381 from netchampfaris/api-v2-fixes
feat!: Apply permissions in frappe.qb.get_query

Enhancements:
- Supports applying permissions
- Strict input parsing

BREAKING CHANGE:
```py
# Before
frappe.qb.get_query("Task", fields=["sum(is_completed) as count"])

# After
frappe.qb.get_query("Task", fields=[{"SUM": "is_completed", "as": "count"}])
```
2025-06-23 15:50:25 +05:30
Ankush Menat
18ecd6603b
perf: ~2x faster scheduling (#33027)
* perf: Use cached settings

* perf: Cache parsed crons, ~2x faster scheduling
2025-06-20 12:43:22 +00:00
Ankush Menat
b57eb60486
perf: chain db transactions (#33004)
* perf: chain transactions

Frequently used rollback/commits can be modified to chain previous
transaction.

This reduces one query to DB in most requests.

* perf: chain transactions in requests
2025-06-19 12:37:39 +05:30
sokumon
6be013804d fix: remove tests utils and workspace card 2025-06-18 16:23:36 +05:30
Faris Ansari
56c3a55665 fix: print traceback instead of errprint 2025-06-18 15:56:11 +05:30
Faris Ansari
fc86f9737b fix: print error traceback in api/v2 2025-06-18 15:51:13 +05:30
Akhil Narang
865e086bd4
build: bump dependencies (#32975)
* build(deps): bump babel

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump filelock

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump GitPython

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump Jinja2

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump Pillow

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump PyJWT

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump pypdf

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump pydyf

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump werkzeug

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump bs4

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump bleach

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump chardet

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump croniter

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump cryptography

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump pyopenssl

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump cssutils

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump markdown2

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump markupsafe

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump num2words

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump openpyxl

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump phonenumbers

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump psutil

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump pydantic

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump pyotp

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump dateutil

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump ipython

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump pytz

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump hiredis

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump requests-oauthlib

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump requests

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump rsa

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump sql_metadata

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump tenacity

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump traceback-with-variables

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump tomli

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump uuid-utils

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump xlrd

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump zxcvbn

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump markdownify

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump google libraries

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump posthog

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump vobject

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* fix(zxcvbn): set max password length as 128

We allow checking till 128 characters, v4.5.0 has a default max of 72

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-06-18 12:33:36 +05:30
Ankush Menat
6091040e97
fix: Skip redis cache signal if redis is down (#32967)
https://github.com/frappe/frappe/pull/32888#issuecomment-2975345660
2025-06-17 13:59:31 +00:00