Commit a0d4658
fix(worker): guard against stale public flags when Bitbucket Server feature.public.access is disabled (#999)
When feature.public.access is turned off on a Bitbucket Server instance,
per-repo public flags are not reset, so repos that were previously public
still appear as public: true in the API. This caused Sourcebot to treat
those repos as publicly accessible in the permission filter, potentially
exposing them to users who no longer have access.
Fix by making a single unauthenticated probe request to one of the
reportedly-public repos during compilation. If the probe fails, the
feature flag is assumed disabled and all repos are treated as private.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 13629e9 commit a0d4658
File tree
3 files changed
+48
-2
lines changed- packages/backend/src
3 files changed
+48
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
785 | 812 | | |
786 | 813 | | |
787 | 814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
404 | 420 | | |
405 | 421 | | |
406 | 422 | | |
| |||
467 | 483 | | |
468 | 484 | | |
469 | 485 | | |
470 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
471 | 489 | | |
472 | 490 | | |
473 | 491 | | |
| |||
0 commit comments