Commit graph

3109 commits

Author SHA1 Message Date
niraj gautam
fbbdef1e9c
feat: Dynamically generate license text (#22299)
* feat: Add dynamic license dtext

* feat: Validate license name

* fix(DX): Pass options as click.Choice

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-05 05:45:27 +00:00
gavin
c3efddd380
fix: Allow DB Callback Managers in Safe Exec (#22302) 2023-09-05 10:38:14 +05:30
David Arnold
011e44656b
fix(test): ensure tests construe the site url from its constructor (#21870) 2023-09-02 15:36:24 +05:30
Ankush Menat
5215cc3c74
Merge pull request #22266 from Xieyt/fix/new-app-email-validation
fix: add Email Validation in boilerplate creation
2023-09-02 11:39:18 +05:30
Ankush Menat
1ad5c0ea86 refactor: Avoid regex for email validation
[skip ci]
2023-09-02 11:38:56 +05:30
Corentin Flr
1380241609
chore: Switch to pydantic.ConfigDict in typing_validations.py (#22268)
> PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.0/migration/
2023-09-02 11:23:50 +05:30
Corentin Flr
f88df82820
chore(rq): Pass rq.Callback objects to enqueue_call (#22271)
> DeprecationWarning: Passing a string or function for `on_failure` is deprecated, pass `Callback` instead
2023-09-02 11:22:33 +05:30
Xieyt
98fce7d633
Fix:add Email Validation 2023-08-31 14:04:54 +05:30
Ankush Menat
e9585e9ce6 fix: remove validation on text code
These can overvalidate e.g. "Frappe information technology" contains "format".

Restricted python anyways validates these attr access at runtime, so no
need to validate this on code.
2023-08-31 11:03:28 +05:30
Ankush Menat
e88cdb6e70
Merge pull request #22224 from ankush/desk_user
feat: `Desk User` role
2023-08-29 20:27:21 +05:30
Ankush Menat
1b406edd54 feat: Desk User role 2023-08-28 22:31:23 +05:30
Babuuu
173605fe2c
chore: Update boilerplate gitignore (#22220)
Add __pycache__ to .gitignore file of the new app.
2023-08-28 16:54:54 +05:30
Ankush Menat
961585f1d9
fix: misc dx improvemnts (#22188)
* fix(dx): simplify adding callbacks

frappe.db.after_commit(func) == frappe.db.after_commit.add(func)

* fix: trace id missing

DB gets initted before request
2023-08-28 07:01:25 +00:00
Ankush Menat
74d87796af
Merge pull request #22141 from ankush/server_script_shared
refactor!: Disable server scripts by default
2023-08-23 15:19:54 +05:30
Ankush Menat
56b409d069
fix: limit job count in RQ failed registry (#22162)
* fix: limit job count in RQ failed registry

* chore: remove unnecessary test

This just checks if func is called with right values, which keep
changing as things evolve.
Everything is individually tested now so need for this test.
2023-08-23 09:21:51 +00:00
Ankush Menat
1390b972a8 fix(DX): let users know that server scripts are disabled 2023-08-23 14:49:05 +05:30
Ankush Menat
6e0b522ae3 refactor!: Disable server scripts by default
- Move the config to bench level and not site level because, server
  script "threat model" requires consent from a bench owner and not
  individual site.
- While this is a breaking change which people may not like, we believe
  it's essential to improve security model of Frappe.
2023-08-23 14:49:05 +05:30
Ankush Menat
11806c37a0 feat: error logs to include trace id 2023-08-23 14:20:24 +05:30
Ankush Menat
8ddde056a0 fix: dont allow NamedExpr in safe_eval 2023-08-21 12:42:21 +05:30
Ankush Menat
eede56d5df fix: dont allow writes to live objects 2023-08-21 12:04:55 +05:30
Ankush Menat
f449262050 fix: allow dict access and unpacks 2023-08-21 11:59:53 +05:30
Ankush Menat
14b62d7ff1 fix: correct getattr implementation for safe_eval 2023-08-21 11:59:53 +05:30
Ankush Menat
3531f58b54 refactor: unify safe_exec and safe_eval code
A lot of duplication was present for this code.
2023-08-21 11:59:53 +05:30
mergify[bot]
d6d82eb581
Merge pull request #22110 from resilient-tech/perf-as_dict-2
perf: undo regression in `as_dict` performance
2023-08-21 06:10:54 +00:00
Sagar Vora
01c269726f fix: disallow unsafe attrs in jinja 2023-08-20 22:26:19 +05:30
Sagar Vora
7dc67f2feb chore: add back getattr for virtual docfields which get value from a property 2023-08-18 21:51:56 +05:30
David Arnold
1a061d4590
fix: rely on pyenv to collect bench commands, however that may be set up (#21975) 2023-08-14 15:02:32 +05:30
Ankush Menat
8d5d371ba8 chore: off by one error in site age 2023-08-14 10:25:11 +05:30
Ankush Menat
4d5a945861
refactor: reduce duplication in unsafe attr checks (#22033) 2023-08-13 18:23:41 +05:30
Ankush Menat
ce1355dab8
fix: block format attributes (#22028) 2023-08-12 22:12:30 +05:30
Ankush Menat
16aa414fda fix: flush telemetry before ending background job 2023-08-12 12:13:59 +05:30
Ankush Menat
19d33a9a88
fix: fair-er scheduling for multitenant deploys (#22022) 2023-08-12 10:55:35 +05:30
Ankush Menat
cbe816347e
Merge pull request #22017 from GursheenK/implement-like-in-compare-util
feat: implement like in compare util
2023-08-11 22:16:12 +05:30
Ankush Menat
7a5a0c27a2 fix: Support SQL like LIKE filter
Other changes:
- Ignore empty doctype in filter creator
- Simplified recorder filter evals
2023-08-11 21:24:38 +05:30
Ankush Menat
8a81ac265e chore: change telemetry code order 2023-08-11 17:18:19 +05:30
Gursheen Anand
b019a1163c feat: implement like & not like in compare util 2023-08-11 15:34:07 +05:30
Ankush Menat
a1f3114305
fix: sanitize frappe._dicts too in TB sanitizer (#22012) 2023-08-11 12:25:40 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
barredterra
b553ed98d8 refactor: inline immediately returned variable
Inline a variable to a return in the case when the
variable being declared is immediately returned
2023-08-08 18:09:49 +02:00
Ankush Menat
a2b2998684
fix(DX): Wrap print format errors (#21944)
[skip ci]
2023-08-06 18:55:16 +05:30
Michelle Alva
fd2efdb0e1
chore: whitelisted typo (#21930) 2023-08-05 20:15:55 +05:30
Suraj Shetty
67a32bd054 fix: Set minimum resolution of image 2023-08-02 10:54:36 +05:30
Suraj Shetty
a7be8ccff2 Merge remote-tracking branch 'upstream' into fix-image-compression 2023-08-02 10:13:52 +05:30
Suraj Shetty
3621daf699 fix: Compress bit more agressively 2023-08-02 09:25:48 +05:30
David Arnold
3471685eaa
feat(ops): add environment variable to set bench root / workdir (#21872) 2023-07-31 11:50:09 +05:30
Ankush Menat
7ee85758b1
fix(console): dont commit when exception is raised and unconditionally check query (#21850)
* fix(console): unconditionally check query type

* fix(console): don't commit when exception occurs
2023-07-28 18:07:08 +05:30
Ankush Menat
ef51dde052
perf: set lower priority for background processes (#21841) 2023-07-28 13:01:46 +05:30
Ankush Menat
6e94cd2eb9
fix: Guess most likely exception source (#21827) 2023-07-27 17:30:04 +05:30
Abdo
35c929afdb
refactor(money in words): translatable currency Name (#21672) 2023-07-27 17:21:57 +05:30
Suraj Shetty
6c509f6dd1
Merge pull request #21782 from blaggacao/bump-bleach 2023-07-25 18:21:31 +05:30