From 4b65d68a1bdae733419cefbe7f46666f0c623254 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Thu, 17 May 2018 11:10:52 +0200 Subject: [PATCH] '?' is now an illegal character for the REST API 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.' ). --- firebase_admin/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase_admin/db.py b/firebase_admin/db.py index c29c30d7..aa7f4483 100644 --- a/firebase_admin/db.py +++ b/firebase_admin/db.py @@ -34,7 +34,7 @@ _DB_ATTRIBUTE = '_database' -_INVALID_PATH_CHARACTERS = '[].#$' +_INVALID_PATH_CHARACTERS = '[].?#$' _RESERVED_FILTERS = ('$key', '$value', '$priority') _USER_AGENT = 'Firebase/HTTP/{0}/{1}.{2}/AdminPython'.format( firebase_admin.__version__, sys.version_info.major, sys.version_info.minor)