GithubHelp home page GithubHelp logo

Comments (7)

zabawaba99 avatar zabawaba99 commented on August 24, 2024

Hey @ArturHS, thanks for opening up the issue. I went ahead and isolated the code that creates the query string on this Go Playground. It's odd that another special character works since they all get escaped when encoding it.

Can you verify that the data stored in Firebase has the leading +?

from firego.

arturscheiner avatar arturscheiner commented on August 24, 2024

Hi @zabawaba99, in Firebase the data stored is a string like this "+5561999999999", right now i'm changing my app not to write the "+" sign. It is, indeed, a strange behavior. I was playing around with other chars. These are my findings:

if string starts with "+" returns -> false
if string starts with "-=@$^*()_" returns -> true
if string starts with "&" doesn't run -> "error" : "Constraint index field must be a JSON primitive"
if string starts with "#" doesn't run -> "error" : "orderBy must be defined when other query parameters are defined"
if string starts with "%" doesn't run -> "error" : "Bad Request"

Maybe this problem is related with the way chars are encoded in the firebase calls...

from firego.

rockwotj avatar rockwotj commented on August 24, 2024

This is an issue with the realtime database's handling of URL Decoding and is a very old bug.

There is a workaround, this will work if you add a header of X-Firebase-Decoding: 1 to the request. At some point in the future we'll fix this correctly without needing the header.

from firego.

zabawaba99 avatar zabawaba99 commented on August 24, 2024

context for anyone else following along firebase/firebase-admin-go#186

@rockwotj - Would adding X-Firebase-Decoding: 1 to every request be ok or would we need to add it only to requests that have these query params?

from firego.

rockwotj avatar rockwotj commented on August 24, 2024

You should just add it all the time

from firego.

rockwotj avatar rockwotj commented on August 24, 2024

This should be fixed now and you don't need to specify the header.

from firego.

zabawaba99 avatar zabawaba99 commented on August 24, 2024

Closing issue as repository is being archived.

from firego.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.