This repository was archived by the owner on Mar 4, 2026. It is now read-only.
Commit fa0ad66
fix: Don't allow serialization of firestore settings (#1742)
* Dont allow serialization of firestore settings
When logging any firestore object like WriteBatch,Transaction,etc the settings object also gets logged / exposed
This can be seen by running JSON.stringify on any firestore object even a document reference
Many developers log firestore objects to help them debug testing/prod issues, this leaking of entire firestore key via this._settings is a bad practice as per me
We can also use Object.defineProperty to make it non-enumerable or any other technique that you like
* Fix formatting.
* Only redact credentials.
Co-authored-by: Ehsan Nasiri <[email protected]>1 parent a67a124 commit fa0ad66
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
655 | 662 | | |
656 | 663 | | |
657 | 664 | | |
| |||
0 commit comments