Is it not possible to use special characters for field keys? #446
-
I added a feature that allows users to create their own puzzles and to upload them to Firestore. The field key is set as the title string specified by the user, but when I tried to update fields with keys containing '?' or '....', it resulted in an error. However, there was no issue when adding these directly through the Firebase console. Why does this happen? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not completely sure, but it's possible either they updated the rules on what's allowed as characters of keys and we didn't, or perhaps the REST API just won't allow them, not sure. That said, why would you allow them to set the key for the values? Don't you want to set the key to "title" and the value to whatever they have written, so you can actually reference it in your game? It sounds like you have something backwards perhaps, unless I'm missing why you'd want to allow someone to potentially break your database by injecting code or other things into it in that fashion. |
Beta Was this translation helpful? Give feedback.
Not completely sure, but it's possible either they updated the rules on what's allowed as characters of keys and we didn't, or perhaps the REST API just won't allow them, not sure. That said, why would you allow them to set the key for the values? Don't you want to set the key to "title" and the value to whatever they have written, so you can actually reference it in your game? It sounds like you have something backwards perhaps, unless I'm missing why you'd want to allow someone to potentially break your database by injecting code or other things into it in that fashion.