Open davestimpert opened 4 days ago
@paulb777 is this fixed and just not released yet? Not sure why it was closed.
Sorry, my mistake. It looks like this issue was in the middle of several spam issues that I bulk closed.
Hi @davestimpert , thanks for the report. I'm able to reproduce this issue.
firebase_storage
example app with the updated uploadString
function above.
Is there an existing issue for this?
Which plugins are affected?
Storage
Which platforms are affected?
macOS, Web
Description
I'm trying to get a storage ref from a pre-signed storage URL (where therefore has query params on it for the authentication). If I pass this into FirebaseStorage
refFromUrl
the app hangs and eventually crashes. Confirmed on both web and MacOS. I'm assuming all platforms are affected.Here's the code where it is happening. The app hangs on the
firstMatch
I tested the regex used in regex101
^https?:\/\/(?:storage.googleapis.com|storage.cloud.google.com)(?::\d+)?\/([A-Za-z0-9.\-_]+)\/([^?#]*)*$
And confirmed that if I put querystring params on the url, e.g.
https://storage.googleapis.com/myapp.appspot.com/users/john/chat/image.jpg?foo=bar
Then there's an error: Catastrophic backtracking has been detected and the execution of your expression has been halted. To find out more and what this is, please read the following article: Runaway Regular ExpressionsReproducing the issue
Call FirebaseStorage.instance.refFromUrl('https://storage.googleapis.com/myapp.appspot.com/users/john/chat/image.jpg?foo=bar')
Firebase Core version
3.3.0
Flutter Version
3.24.4
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippet```yaml Replace this line with the contents of your `flutter pub deps -- --style=compact`. ```
Additional context and comments
No response