Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is it not possible to use special characters for field keys? #446

Answered by WolfgangSenff
zlzonchan asked this question in Q&A
Discussion options

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?

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

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.

You must be logged in to vote
1 reply
Comment options

I agree. This is my first time managing database so I think I missed that point. I'll implement these changes. Thanks!

Answer selected by zlzonchan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /