on master help sign in
Fix profile photo clearing on absent field, remove dead code in padded_len, fix CI comment typo

- app.rs: gate c.photo assignment with if let Some, matching D13 design (absent photo field now preserves existing cached photo instead of clearing) - crypto.rs: remove dead else branch in padded_len (actual <= 65536 already handled by the for-loop above) - build.yml: fix comment typo (336 -> 346 char floor)

commit82eae7c19085877cd03511eb67cbd5aa82633fe8 authorLancelot <montelot-dev@typeable.io> dateSat 18 Jul 2026, 02:15 (2 months ago) parent850d68d
3 files changed+5−7
unifiedsplit
.github/workflows/build.yml+1−1 core/src/app.rs+3−1 core/src/crypto.rs+1−5
.github/workflows/build.yml+1−1
@@ -157,7 +157,7 @@ jobs:
157157
158158 PK=$(printf '0%.0s' $(seq 1 64)) # 64 hex chars: a well-formed pubkey
159159 SIG=$(printf '0%.0s' $(seq 1 128)) # 128 hex chars: a well-formed signature
160− BLOB=$(printf 'ab%.0s' $(seq 1 200)) # 400 hex chars: over the 336-char floor
160+ BLOB=$(printf 'ab%.0s' $(seq 1 200)) # 400 hex chars: over the 346-char floor
161161
162162 # $1 = expected status, $2 = label, rest = curl args
163163 expect() {
core/src/app.rs+3−1
@@ -2387,7 +2387,9 @@ impl Skrepka {
23872387 if let Some(b) = bio {
23882388 c.bio = b;
23892389 }
2390− c.photo = photo;
2390+ if let Some(p) = photo {
2391+ c.photo = Some(p);
2392+ }
23912393 c.last_profile_ts = ts.min(now);
23922394 contacts_dirty = true;
23932395 }
core/src/crypto.rs+1−5
@@ -93,11 +93,7 @@ fn padded_len(actual: usize) -> usize {
9393 // D6: When actual is an exact multiple of 65536 above 65536,
9494 // returning `actual` would give zero padding, revealing the exact
9595 // compressed size. Always add at least one bucket of padding.
96− if actual > PADDING_BUCKETS[8] {
97− actual + 65536
98− } else {
99− actual
100− }
96+ actual + 65536
10197 } else {
10298 actual + 65536 - remainder
10399 }