Commit graph

53 commits

Author SHA1 Message Date
Dominik Ottenbreit
cc19e06ed7 Fix docstring information to be clear (#5025)
* Fix docstring information to be clear

Updated the docstrings due to errors I encountered:
* `is_private` must be 1, normally would expect true or false
* `filedata` must be urlencoded base64 to work

* Update client.py
2018-02-19 11:20:29 +05:30
Revant Nandgaonkar
856cbfa675 Attach file via ReST API (POST) (#4965)
* Attach file via ReST API (POST)

* [Fix] import save_file

* request body as param, validate request method

* explicit naming - decode_base64
2018-02-12 17:06:58 +05:30
Achilles Rasquinha
eb229ad14b Fixed Codacy 2018-01-18 16:57:04 +05:30
Achilles Rasquinha
f0697b65a1 added get_single_value 2018-01-15 14:55:13 +05:30
Rushabh Mehta
cd968348d7 [minor] better message on permission 2017-10-16 10:18:56 +05:30
Shreya Shah
c5cf341f48 integer conversion fix (#4085) 2017-09-09 10:45:51 +05:30
Makarand Bauskar
6fa9967a04 [hotfix] throw DoesNotExistError if doctype is not available on Delete api (#4013)
* [hotfix] throw DoesNotExistError if doctype is not available on Delete api

* [fixes] aded tests cases and codecy, travis fixes
2017-09-01 09:16:32 +05:30
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
Revant Nandgaonkar
f8387ac039 added whitelisted function get_time_zone (#3843) 2017-08-07 18:02:48 +05:30
Nabin Hait
e504671de8 Minor fix in client.get_value (#3852) 2017-08-03 17:01:16 +05:30
RogueRonin
4776011cbc check whether the used filters were really parseable and usable and did not just result in an empty string or dict (#3822) 2017-08-02 16:55:46 +05:30
Makarand Bauskar
465d6b3431 [minor] fixes in frappe.client.get_value method (#3830) 2017-08-01 16:42:28 +05:30
tundebabzy
bbde2ec4cf rewrite use of dict.iteritems (#3498)
* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility
2017-06-19 09:10:21 +05:30
Mohammed R Abukhamseen
f5a904a897 Exception translatable (#3473)
* Add persian right to left

* Update locale-all.js

Add Arabic translation for datepicker

* Make Exception translatabl with better UI

* Update desk.js
2017-06-16 11:11:56 +05:30
exabakr
df6a1ce686 [URGENT] Prevent accessing sensitive files in client.get_js
Logged in user (any permissions) can access sensitive files by calling frappe.client.get_js

Consider the following scenario:
1- Login to system
2- http://HOST/?items=["currentsite.txt"]&cmd=frappe.client.get_js  (this will give you site directory name)
3- http://HOST/?items=["SITE_DIR_NAME%2Fsite_config.json"]&cmd=frappe.client.get_js (this will show you site config including database name and password and any other sensitive data

The suggested fix prevent accessing any file outside the assets folder. (or atleast you should prevent access to .py files and private folder which includes backup and sensetive files and logs folders)

There should be a hot fix asap
2016-11-30 04:04:24 +03:00
Rushabh Mehta
819983a7b6 Merge branch 'master' into develop 2016-11-16 11:20:42 +05:30
Rushabh Mehta
c5551201e4 [fix] frappe.client.set_value for unsetting value (#2323) 2016-11-16 11:08:39 +05:30
Rushabh Mehta
638816acd0 [docs] for frappe client #2209 2016-11-08 12:24:20 +05:30
Rushabh Mehta
89a77016a5 [minor] dont show disabled roles in permission manager (#2180) 2016-10-25 10:59:41 +05:30
Rushabh Mehta
512fc3a5c2 [feature] [api] frappe.client.insert_many 2016-08-09 11:09:31 +05:30
Anand Doshi
2162b695d4 [api call] frappe.client.get_password 2016-07-24 14:09:50 +05:30
Maxwell Morais
3a23409239 Fix: TypeError: unhashable type: 'dict'
```python
Traceback (innermost last):
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
    response = frappe.handler.handle()
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
    execute_cmd(cmd)
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/__init__.py", line 805, in call
    return fn(*args, **newargs)
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/client.py", line 79, in insert
    parent.append(doc)
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/model/base_document.py", line 130, in append
    if not self.__dict__.get(key):
 TypeError: unhashable type: 'dict'
```
2016-05-14 23:18:52 -03:00
Maxwell Morais
d1c6c9f0f1 Fix: AttributeError: 'dict' object has no attribute 'parenttype'
```python
Traceback (innermost last):
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
    response = frappe.handler.handle()
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
    execute_cmd(cmd)
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/__init__.py", line 805, in call
    return fn(*args, **newargs)
  File "/usr/frappe5/frappe-bench/apps/frappe/frappe/client.py", line 78, in insert
    parent = frappe.get_doc(doc.parenttype, doc.parent)
 AttributeError: 'dict' object has no attribute 'parenttype'
```
2016-05-14 23:14:54 -03:00
Rushabh Mehta
fe330d3209 [cleanup] frappe.require 2016-04-26 12:58:30 +05:30
Rushabh Mehta
6f2b58c095 [fix] control.js for read only values 2016-04-25 17:53:13 +05:30
Anand Doshi
569f2f068a [fix] get_js 2015-11-17 18:28:37 +05:30
Rushabh Mehta
d924fd1715 [fix] [minor] 2015-05-05 17:41:23 +05:30
Rushabh Mehta
5034e7e660 [api] add frappe.model.get_value in js (gets value from serverside) 2015-03-05 11:58:40 +05:30
Anand Doshi
98958334b5 Merge pull request #1026 from pdvyas/limit-page-length
limit page length to 20 by default only for api requests
2015-03-03 15:45:49 +05:30
Anand Doshi
2995f02f3b Web Notes to Frappe, better alerts, css fixes, fixed splash 2015-03-03 15:09:34 +05:30
Pratik Vyas
b6e9b9b7ca limit page length to 20 by default only to api requests 2015-02-22 16:30:42 +05:30
Rushabh Mehta
cf3074a20b [print-format] completed print format builder 2015-01-30 17:08:12 +05:30
Rushabh Mehta
4b519bdada [api] frappe.get_all 2014-09-30 17:44:41 +05:30
Rushabh Mehta
575ec0015a [api] added frappe.client.get_list 2014-09-26 18:53:37 +05:30
nathando
1a1a23f032 Typo Error ? frappe.client.submit fail
- Frappe client use this submit function and failed due to doclist is actually a {dict} or a [list]. Both cannot have as_dict() function 
- Seem like just a typo -> change to doclistobj instead.
2014-08-29 10:35:50 +08:00
Nabin Hait
791b2374c5 dont allow to edit read only fields through report view 2014-08-22 14:09:27 +05:30
Anand Doshi
1fb25aa093 Fixed add width property setter 2014-06-16 16:06:22 +05:30
Rushabh Mehta
73730ccf1f fix for button and better way to add list, fixes frappe/erpnext#702 2014-06-05 18:06:09 +05:30
Rushabh Mehta
12ecc5ac42 added form tests for selenium testing 2014-05-01 12:24:49 +05:30
Rushabh Mehta
f553841fba updated translations 2014-04-16 17:46:54 +05:30
Rushabh Mehta
246a2a84fb fixed strings for translation 2014-04-15 14:40:00 +05:30
Rushabh Mehta
5d4e39bef6 frappe/frappe#478, more changes, removed bean 2014-04-03 14:30:49 +05:30
Rushabh Mehta
63eb09f3a3 frappe/frappe#478 removed more instances of doclist 2014-04-03 12:38:46 +05:30
Rushabh Mehta
081739b10a frappe/frappe#478, removed instances of .fields 2014-03-31 23:37:45 +05:30
Rushabh Mehta
7bef30b270 frappe/frappe#478 2014-03-28 16:52:23 +05:30
Anand Doshi
f1eb0dd005 Replaced doc, doc.fields frappe/frappe#478 2014-03-28 13:54:53 +05:30
Rushabh Mehta
1e364ba1c7 #478 2014-03-28 11:34:59 +05:30
Rushabh Mehta
caed23686c minor fixes 2014-03-18 19:21:18 +05:30
Rushabh Mehta
0a43add3d3 few minor fixes 2014-03-13 18:41:13 +05:30
Rushabh Mehta
226087c460 fixes 2014-02-27 13:24:28 +05:30