Skip to content

Commit c420b4f

Browse files
Bien-CVhiranya911
authored andcommitted
'?' is now an illegal character for the REST API (#165)
Having a '?' character in a path raised an ApiCallError (405 Client Error: Method Not Allowed for url: -fakeURLwith?-.json Reason: append .json to your request URI to use the REST API. ). It is indeed not the right error. This pull request allows the correct error to be raised ( ValueError : 'Invalid path: "{0}". Path contains illegal characters.' ).
1 parent 70d9817 commit c420b4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firebase_admin/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535

3636
_DB_ATTRIBUTE = '_database'
37-
_INVALID_PATH_CHARACTERS = '[].#$'
37+
_INVALID_PATH_CHARACTERS = '[].?#$'
3838
_RESERVED_FILTERS = ('$key', '$value', '$priority')
3939
_USER_AGENT = 'Firebase/HTTP/{0}/{1}.{2}/AdminPython'.format(
4040
firebase_admin.__version__, sys.version_info.major, sys.version_info.minor)

0 commit comments

Comments
 (0)