Commit a99fedc
committed
fix(pwpush): stop stale settings from silently breaking every push
A saved AccountId with bearer auth off, or an out-of-range expiry value,
made New-Push throw at parameter binding. New-PwPushLink swallowed the
exception into $false, so the extension test reported "PWPush is not
enabled" while password flows fell back to plain text passwords in
notifications.
- Only pass AccountId to New-Push when bearer auth is on and the saved
value is non-empty; a placeholder or stale selection no longer kills
the push.
- Drop ExpireAfterDays/ExpireAfterViews values outside PassPushPosh's
accepted ranges (1-90 / 1-100) with a logged warning instead of
letting validation throw.
- ExecExtensionTest now checks Enabled explicitly and surfaces the real
exception via a new -ThrowOnError switch instead of collapsing every
failure into "PWPush is not enabled".
- Make placeholder dropdown rows with an empty id unselectable in
integration settings so the poison value cannot be saved again.
Synced from CyberDrain/CIPP@07e04151 parent 7357fc8 commit a99fedc
2 files changed
Lines changed: 43 additions & 6 deletions
File tree
- Modules
- CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Extensions
- CippExtensions/Public/PwPush
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
58 | | - | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
42 | 62 | | |
43 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
44 | 68 | | |
45 | 69 | | |
46 | 70 | | |
| |||
56 | 80 | | |
57 | 81 | | |
58 | 82 | | |
| 83 | + | |
59 | 84 | | |
60 | 85 | | |
61 | 86 | | |
62 | 87 | | |
63 | 88 | | |
| 89 | + | |
64 | 90 | | |
65 | 91 | | |
66 | 92 | | |
0 commit comments