[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly check that document and collection IDs given to the public API aren't empty #8248

Merged
merged 3 commits into from
Jun 14, 2021

Conversation

var-const
Copy link
Contributor

Currently, the error would look like Document references must have an even number of segments, but has 0.

Fixes #8218.

@google-oss-bot
Copy link
1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

Copy link
Contributor Author
@var-const var-const left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schmidt-sebastian Sebastian, do you think this needs to be mentioned in the changelog?

@google-oss-bot
Copy link
google-oss-bot commented Jun 12, 2021

Coverage Report

Affected SDKs

  • FirebaseFirestore-iOS-FirebaseFirestore.framework

    SDK overall coverage changed from 88.47% (e6dfb10) to 88.53% (fa64b2d) by +0.05%.

    Filename Base (e6dfb10) Head (fa64b2d) Diff
    FIRCollectionReference.mm 95.31% 95.52% +0.21%
    FIRDocumentReference.mm 97.14% 97.20% +0.06%
    FIRFirestore.mm 91.59% 92.24% +0.65%
    leveldb_key.cc 96.79% 98.10% +1.31%

Test Logs

Copy link
Contributor
@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be mentioned in the changelog in case it is the only change in the release.

@var-const var-const merged commit 633fa55 into master Jun 14, 2021
@var-const var-const deleted the varconst/check-empty-id branch June 14, 2021 22:23
@nidegen
Copy link
nidegen commented Jul 4, 2021

This is actually an Issue for me. I was using this to refer either to top level domain collections or child collections from the same DocumentRef variable, i.e. database = firestore.document(isDevel ? "devel/001" : "").

This is breaking API for me, it would be nice if it was undone:)

@firebase firebase locked and limited conversation to collaborators Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-nil empty strings cause Firestore to crash instead of throwing an error gracefully
4 participants