Commit graph

49 commits

Author SHA1 Message Date
Aditya Hase
c033e0d34d
fix(server scripts): Restrict access to python's internal attributes 2021-05-31 19:24:36 +05:30
Aditya Hase
980f224bba
Merge pull request #13253 from rmehta/safe-json 2021-05-31 10:42:56 +05:30
Gavin D'souza
8cc6804850 fix: Show deprecation warnings only if DEV_SERVER is set
This will show warnings in bench start commands by default as this
envvar is set.
2021-05-19 13:16:16 +05:30
Rushabh Mehta
2b8aaa5375 fix(minor): expose limited methods of json module 2021-05-18 21:12:45 +05:30
Faris Ansari
8678c09e91
feat: Add log_error and FrappeClient to restricted python (#12857) 2021-04-15 14:34:23 +05:30
Rohit Waghchaure
1dc2ae4be3 fix: modal width 2021-02-11 14:51:19 +05:30
Rushabh Mehta
bca3aecdaf fix(minor): fix routing and titles + added frappe.utils.markdown alias to frappe.utils.md_to_html 2021-01-31 18:18:47 +05:30
Suraj Shetty
ce379bc200 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2021-01-28 19:56:54 +05:30
Gavin D'souza
33ea496a8b feat: Added get_datetime_in_timezone in frappe.utils to get datetime in specific timezones
* Added util in safe_exec to access via Server Scripts and System
Console
2021-01-21 13:19:31 +05:30
Suraj Shetty
425ab65bb4 fix: Post merge issue 2021-01-21 11:23:41 +05:30
Suraj Shetty
e4bdbed414 Merge branch 'rebrand-ui' of https://github.com/frappe/frappe into rebrand-ui 2021-01-21 11:20:18 +05:30
Suraj Shetty
e2c763c989 feat: Add avatar macro 2021-01-21 11:14:04 +05:30
prssanna
e54a1262b4 Merge branch 'rebrand-ui' of https://github.com/frappe/frappe into rebrand-ui 2021-01-20 17:57:46 +05:30
prssanna
f363863b8c fix: website fixes
-move modal and icon styles to common

primary navbar theme
2021-01-20 17:56:05 +05:30
Suraj Shetty
a7aead676f feat: Set frappe.bold as safe global 2021-01-13 10:36:34 +05:30
Gavin D'souza
d7de64ae91 fix: Return dummy function to avoid NoneType not callable 2020-12-07 13:59:42 +05:30
Gavin D'souza
2c2bb72f6e fix: Show function not available in namespace instead of nothing
Prior to this, frappe._dict was being used to inject functions to the
server script namespaces. This meant unimplemented methods
returned None and we'd get a NoneType not callable error
2020-12-07 13:59:42 +05:30
Gavin D'souza
d5d0bc8ea9 fix: Return dummy function to avoid NoneType not callable 2020-11-30 15:25:55 +05:30
Gavin D'souza
5babacac3e fix: Show function not available in namespace instead of nothing
Prior to this, frappe._dict was being used to inject functions to the
server script namespaces. This meant unimplemented methods
returned None and we'd get a NoneType not callable error
2020-11-27 11:02:37 +05:30
Anupam
3523323c64 fix: frappe.utils.formatdate not working in the jinja template 2020-11-04 19:09:41 +05:30
Rushabh Mehta
8c8f7313f4
fix(minor): make utils explicit in safe_globals (#11408)
* fix(minor): make utils explicit in safe_globals

* fix(minor): import subprocess

* fix(minor): fix globals in safe_eval;

* fix(minor): import subprocess

* fix(minor): add test

* fix(minor): webhook.py

* fix(minor): document_type_mapping.py
2020-09-03 14:26:01 +05:30
Rushabh Mehta
38e024ebbb
Merge pull request #11306 from rmehta/system-console
feat(system console): Added a System Console to help in debugging and Console Log
2020-09-03 11:12:23 +05:30
Rushabh Mehta
c53813950f fix(minor): Server Script can return values in frappe.flags 2020-09-01 12:59:22 +05:30
Rushabh Mehta
f772aee211 fix(minor): don't allow access to global flags 2020-09-01 12:48:26 +05:30
Rushabh Mehta
079a0e4af0 wip: refactor System Console 2020-08-31 11:29:18 +05:30
Rushabh Mehta
1b73602a17 feat(system console): Added a System Console to help in debugging and Console Log 2020-08-31 11:29:18 +05:30
Rushabh Mehta
f2fe49b5e1
Merge pull request #11328 from rmehta/safe-exec-sql
feat(server script): Allow frappe.db.sql for read
2020-08-24 17:46:09 +05:30
Rushabh Mehta
275a70e9d0 feat(minor): allow frappe.db.sql for read in server script 2020-08-20 18:33:29 +05:30
Shivam Mishra
e8691b4d54 feat: allow get_print and attach print in server scripts 2020-08-13 14:36:07 +05:30
Deepesh Garg
b92ce9a245
feat: Allow sending emails via Server Script (#11162)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-08-07 09:25:37 +05:30
Rushabh Mehta
6dbf7a90a1 fix: threading of email replies where message-id is not returned 2020-06-28 09:34:31 +05:30
Chinmay D. Pai
bf8d930d8e
fix: sanitize input before displaying search results
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-27 18:21:53 +05:30
Faris Ansari
caa068932c Merge branch 'develop' of https://github.com/frappe/frappe into page-builder-tailwind 2020-04-24 23:48:29 +05:30
Faris Ansari
e572a3733b fix: Use frappe.throw instead of raise 2020-04-21 21:31:08 +05:30
Saurabh
6624f3a1af enhancement: provision to scheduled server scripts execution 2020-04-03 18:13:27 +05:30
Suraj Shetty
f343d15995 fix: Remove _ & _dict from frappe because add_module_properties ignores it 2020-01-01 09:34:37 +05:30
Andrew McLeod
07cedc581d feat: Optionally remove seconds from datetime (#8531)
* fix: Add updated datepicker; fixed seconds formatting bug.
Seconds between 0 and 9 were not zero-padded.

* feat: Add framework for time format

* feat: datetime server-side formatters.

* tests: Added server-side datetime formatter tests

* feat: Update client-side datetime formatters

* tests: Add Cypress client-side formatting tests.

* fix: JSON errors

* fix: Update to not hard-code admin password

* fix: Change to using bulk_update rather than the REST API

* tests: Use Custom doctype for testing, not Standard

* fix: Codacy style fixes

* fix: Commonify update_datetime_picker in date.js, datetime.js, time.js
Fix order of time_format in System Settings
Restore get_user_fmt in utils/datetime.js

* feat: Drastically reduce scale of Cypress testing (to make tests faster)
Full testing is possible by setting 'fast_mode' to false in the spec file.

* fix: Fix issues with datepicker/timepicker expansion

* fix: typo

* style: Various style fixes as requested by DeppSource: Python

* fix: Timepicker not hiding on 'now' button. Force hiding on click.

* style: Codacy style fixes.

* fix: Use datepicker from node_modules

* test: Refactor Datetime UI tests

- cy.get_field
- cy.set_value
- cy.insert_doc with ignore_duplicate
- Nominal datetime tests to cover most formats
- Formatting with prettier

* test: Datetime UI tests; wait for cur_frm.doc.datetime to update

* tests: Add whitespace to typed input

- Clear input only for Time field

* test: Wait timeout 200

* test: Fix form test

Co-authored-by: Faris Ansari <netchampfaris@users.noreply.github.com>
2019-12-25 14:54:28 +05:30
Rushabh Mehta
5caa88967e fix(minor): remove print from safe_exec 2019-12-24 22:21:21 +05:30
Rushabh Mehta
711e34c059 feat(safe_exec): allow frappe.db.set_value 2019-12-24 22:21:21 +05:30
Rushabh Mehta
c4c35be68d fix(safe_exec): allow sorted 2019-12-24 22:21:21 +05:30
Rushabh Mehta
c9afc965c1 fix(safe_exec): allow frappe.utils.[function] 2019-12-24 22:21:21 +05:30
Rushabh Mehta
2394586d11 feat(safe_exec): allow iterators and comprehension 2019-12-24 22:21:21 +05:30
Rushabh Mehta
4a39652850 fix(minor) 2019-10-11 15:31:45 +05:30
Rushabh Mehta
3d22ecc5f3 fix(minor) 2019-10-11 15:05:39 +05:30
Rushabh Mehta
a1a1200adb fix(imports) 2019-10-11 14:47:25 +05:30
Rushabh Mehta
c57f128000 fix(minor): add comments 2019-10-11 14:34:14 +05:30
Rushabh Mehta
b84663621f fix(linting) 2019-10-11 14:16:49 +05:30
Rushabh Mehta
9d38990c2d fix(report): custom script report 2019-10-11 14:16:49 +05:30
Rushabh Mehta
9d615f7f12 fix(security): use restricted python 2019-10-11 14:16:49 +05:30
Renamed from frappe/utils/safe_globals.py (Browse further)