Commit graph

898 commits

Author SHA1 Message Date
rohitwaghchaure
df6687f9c0 fix: After rename, user still able to search document using old name (#6515) 2018-11-22 11:33:29 +05:30
Saurabh
856a721073 [fix] sql injection fix (#6390) 2018-11-05 10:51:57 +05:30
Suraj Shetty
15d3f4660e fix(security): pop ignore_permissions arg from whitelisted method 2018-11-05 10:29:50 +05:30
Suraj Shetty
0aee7afb87 Fix permission error while import (#6385)
Custom permission should apply while import
or else import of doctype with custom roles fails
2018-11-02 12:19:25 +05:30
Saurabh
a1e68b6fd5 [fix] potential sql injection by sanitizing fields parameter 2018-10-31 14:26:22 +05:30
rohitwaghchaure
1c8db8fee3 [Fix] Permlevel 1 with read permission fields are not disaplying in the form (#6160) 2018-10-02 10:08:59 +05:30
Suraj Shetty
a380db49a8 Validation fix (#6138)
* Validate set_only_once only on doc update

* Remove redundant error message
2018-09-27 09:16:36 +05:30
Ameya Shenoy
5c6b02515a regex fix (#5765)
courtesy: @netchanpfaris
initally the regex used to allow only digits 0-9, not it considers the
entire number range
2018-07-03 14:55:21 +05:30
Saurabh
e2b1ebe84c [Security][fix] To avoid possible sql injection via filters and or_filters parameters and tighten the field level checks (#5721)
* [fix] sanitize filters and or_filters to avoid sql injection

* add test cases for filter sanitizer

* codacy fix

* added test cases to test valid scenarios
2018-06-27 09:15:42 +05:30
Ameya Shenoy
b0c765a8d1 [fix] check if length exists (#5621) 2018-05-28 16:30:24 +05:30
Manas Solanki
78c839eb5f handle Int overflow (#5607)
* handle the int overflow

 - convert the int to the bigint if the length is more than 11

* proper formatting
2018-05-25 10:47:44 +05:30
Ameya Shenoy
439effed7d Rebuild help for docs which have been renamed (#5521)
After execution of a bulk rename, the help cache for the particular
doctype didn't used to change. Added this fix to ensure the help is
rebuilt for the particular doctype whose docs have been renamed
2018-05-06 11:59:00 +05:30
Faris Ansari
8923cb6aa9 Validate fieldnames that contain space (#5499) 2018-04-30 11:27:44 +05:30
Nabin Hait
de63fa5737
Sync optimization related to varchar length and index on version table (#5437)
* Sync optimization related to varchar length and index on version table

* Minor fix
2018-04-17 11:58:01 +05:30
Shreya Shah
fc7de01017 Raise exception while deleting an item which is a product bundle (#5286)
* raise exception while deleting an item which is a product bundle

* separated if statements and added a comment

* modified condition
2018-04-16 01:26:19 -08:00
Shreya Shah
64fe2749cb avoid link validation error in authentication (#5415) 2018-04-16 01:25:34 -08:00
Rushabh Mehta
74046de5dd [minor] 2018-04-16 10:57:33 +05:30
Saurabh
b5f4959f74 check track changes attribute with getattr (#5435) 2018-04-12 11:14:14 +05:30
Nabin Hait
665d203146 Save versions only if track changes enabled 2018-04-09 19:06:09 +05:30
Shreya Shah
e2732751a2 able to pass filters (#5323) 2018-04-02 10:43:04 +05:30
Nabin Hait
3dab3478db Minor fix in autonaming 2018-03-22 12:14:21 +05:30
rohitwaghchaure
553702d671 Read only fields not update if the field has already value (#5126) 2018-03-08 12:02:17 +05:30
Nabin Hait
aa442e33b0 update linked docs if not single 2018-02-27 15:54:07 +05:30
Nabin Hait
b5ecdf22fd Update territory and customer_group patch optimization (#5073) 2018-02-27 15:51:26 +05:30
Zarrar
22534536ce optimize update_linked_doctype util and get_fetch (#5071) 2018-02-27 15:50:00 +05:30
Rushabh Mehta
1aad5d072a [optimize] get_link_fields 2018-02-27 15:49:52 +05:30
Achilles Rasquinha
c2fb0c3bde conditional check for single docs (#5060) 2018-02-27 15:49:39 +05:30
Zarrar
a56fe9a8fb added function to update link-link based dependent values (#5048) 2018-02-27 15:49:28 +05:30
Faris Ansari
3e15c148bd [hotfix] Deadlock fix rename doc (#5001)
* [deadlock fix] rename_version before delete_doc

* Move delete_doc to end of rename_doc
2018-02-13 16:01:58 +05:30
Saurabh
40d818af90 [hotfix] sanitize fields to avoid mysql injection (#4994)
* [fix] sanitize fields to avoid mysql injection

* sanitize sql statements to avoid subqueries

* Added test cases

* Raise exception if mysql injection found in fields and related test-cases

* [fix] riase exception if blacklistes function or keyworkds found in fields
2018-02-13 14:45:51 +05:30
Nabin Hait
63fbff77ae Escape value for using in mysql regexp 2018-01-30 19:01:34 +05:30
rohitwaghchaure
97e18c809e [Fix] Date between filter not working properly on report and listview (#4810) 2018-01-18 15:39:12 +05:30
Faris Ansari
aa7d93cfdb Generic Append number in naming (#4845)
* Generic append_number_if_name_exists

* Add test
2018-01-17 18:45:37 +05:30
Faris Ansari
9dc43f85ce minor 2018-01-11 15:02:19 +05:30
Faris Ansari
ad412de054 Escape name in sql query 2018-01-11 15:00:35 +05:30
Faris Ansari
909234ab9d Listview get_count fix (#4740) 2018-01-02 11:55:49 +05:30
Saurabh
cd8da87907 Merge branch 'master' into develop 2017-11-30 16:40:45 +05:30
Faris Ansari
74883d4f36 Set owner in Deleted Document (#4556) 2017-11-30 14:28:12 +05:30
Saurabh
20fff6e874 Merge branch 'master' into develop 2017-11-22 18:02:53 +05:30
Saurabh
2045e4f1f9 [fix] while deleting a record also check links in single (#4447)
* [fix] while deleting a record also check links in single

* [fix] no HTML in translatable text

* [fix] commonified message for link validation on document delelte
2017-11-21 15:47:30 +05:30
Shreya Shah
acdbb97ba5 Moved feed from Communication to Activity Log (#4435)
* Removed comment_type 'updated'

* New doctype activity log

* Moved feed.py to activity_log

* Updated feed gets stored in activity_log

* Activity page fetches feed from activity_log

* feed match condition change

* modified

* modified hooks.py

* modified sessions.py

* patch added

* naming in patch

* moved login, logout feed to activity_log

* changes in auth.py, hooks.py

* deleted doctype authentication_log and added test cases

* added utils.py in core

* moved some methods from communication.py to utils.py
2017-11-21 15:46:51 +05:30
Nabin Hait
3e7a19e3bb
Update db_query.py 2017-11-15 14:05:01 +05:30
Manas Solanki
7031473915 fixed between filters (#4497) 2017-11-15 13:57:53 +05:30
Rushabh Mehta
3dd5e399fa [minor] base_document.py return empty list if not filters 2017-11-14 16:48:43 +05:30
Nabin Hait
4b5893509a Fixed Merge Conflict 2017-11-14 13:56:42 +05:30
rohitwaghchaure
dd0a237efe [Fix] Title field not set in the quotation if record has been created using data import tool (#4486) 2017-11-14 13:43:00 +05:30
Rushabh Mehta
b1c3c070ee [fix] #4465 2017-11-13 17:33:01 +05:30
Rushabh Mehta
c02a7469aa
[refactor] a better set-only-once implementation with child tables (#4475)
* [refactor] a better set-only-once implementation with child tables

* [refactor] document.is_child_table_same(fieldname)

* [refactor] tests

* [refactor] tests

* [test] catch timeout reason

* [minor] edit in full page more prominent

* [minor] tests
2017-11-13 17:17:20 +05:30
Achilles Rasquinha
b8825ca116 Pure Python MySQL instead mysqlclient (with Python C API) (#4280)
* added PyMYSQL instead mysqlclient-python

* added pymysql import

* fixed db module import

* foxed self._conn wrapper

* updated cursor migration

* removed existent converters

* some more fixes towards API port

* modified travis

* updated doctype and revereted yml

* modified travis

* refreshed logging

* raw fix

* moved from hard coded constants to declarable instances

* moved from hard coded constants to declarable instances

* refactoring and logging

* moved to global import declaration

* fixed codacy

* unfixed codacy

* minor fix

* binary_type has a single

* deprecated alternative

* merged with latest

* fixed merge conflicts

* using deprecated alternative

* raw fix

* stupid fix

* using StringTypes instead

* brutal hack

* log

* tundebazy to the rescue

* fixed content_hash error

* frappe/database.py

* frappe/database.py

* updated database.py

* updated requirements

* updated requirements

* fixed codacy

* fixed codacy

* moved from DatabaseOperationalError to pymysql.InternalError

* moved from DatabaseOperationalError to pymysql.InternalError

* fixed codacy

* empty commit

* fixed codacy

* fixed codacy
2017-11-06 16:42:01 +05:30
Zlash65
539328f591 between date filter fix 2017-11-01 11:34:18 +05:30