GoogleCloudPlatform / firebase-extensions

Apache License 2.0
78 stars 41 forks source link

bug(firestore-palm-*): Regex firestore validation incorrect #112

Open huangjeff5 opened 1 year ago

huangjeff5 commented 1 year ago

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs for a specific extension in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

[REQUIRED] Step 2: Describe your configuration

Expected value https://[REDACTED].[firebaseio.com/prompt/{messageId}/{messageId}](http://firebaseio.com/prompt/%7BmessageId%7D/%7BmessageId%7D) to match regular expression [^/]+/[^/]+(/[^/]+/[^/]+)*\"}]}]

[REQUIRED] Step 3: Describe the problem

Doesn't do regex validation on the frontend so I only know regex issues after installing.

Steps to reproduce:

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

Expected result
Actual result
cabljac commented 1 year ago

I think I was away when this was brought up, am i right in thinking https://[REDACTED].firebaseio.com/prompt/{messageId}/{messageId} is trying to be entered as the COLLECTION_NAME (or COLLECTION_PATH?

I don't think that should be valid, right? The appropriate parameter value should be formatted something like

prompt/{messageId}/{messageId}

cabljac commented 1 year ago

OK I believe the issue here is that

prompt/{messageId}/{messageId}

gets past the regex validation, but will break things (because of the wildcards)

Will look into it and try to fix

cabljac commented 1 year ago

Waiting on some information about the platform's regex support.