Repository navigation
Commit f7aaa62
committed
fix(firestore): disallow float in BSONDecimal128 and validate input strings
Disallow passing float to BSONDecimal128 to prevent binary floating-point
precision loss and edge cases, aligning with PyMongo's Decimal128
behavior. Validate string and numeric inputs via decimal.Decimal in
__init__ to reject invalid numeric strings.1 parent 5440ed6 commit f7aaa62
2 files changed
Lines changed: 27 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
417 | | - | |
| 416 | + | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
| 440 | + | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
443 | 448 | | |
444 | | - | |
| 449 | + | |
445 | 450 | | |
446 | | - | |
| 451 | + | |
| 452 | + | |
447 | 453 | | |
| 454 | + | |
| 455 | + | |
448 | 456 | | |
449 | 457 | | |
450 | 458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
| 499 | + | |
| 500 | + | |
501 | 501 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
| 502 | + | |
| 503 | + | |
507 | 504 | | |
508 | 505 | | |
509 | 506 | | |
| |||
523 | 520 | | |
524 | 521 | | |
525 | 522 | | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | 523 | | |
530 | 524 | | |
531 | 525 | | |
| |||
545 | 539 | | |
546 | 540 | | |
547 | 541 | | |
548 | | - | |
549 | | - | |
550 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
551 | 550 | | |
552 | 551 | | |
553 | 552 | | |
| |||
0 commit comments