Skip to content

Fix/ios cert secret guard - #545

Merged
whes1015 merged 2 commits into
mainfrom
fix/ios-cert-secret-guard
Aug 19, 2026
Merged

Fix/ios cert secret guard#545
whes1015 merged 2 commits into
mainfrom
fix/ios-cert-secret-guard

Conversation

@whes1015

Copy link
Copy Markdown
Member

這個 PR 做了什麼

相關 issue

  • closes #

怎麼驗

檢查清單

  • tool/check/commits.sh origin/main..HEAD 通過
    —— commit 訊息就是更新日誌,格式見 commit.md
  • 一個 commit 一件事(這條 gate 驗不了,靠自己和 review)
  • mise exec -- flutter analyzemise exec -- flutter test 通過
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死
  • 有 UI 變更的話:用的是 AppSpacing / AppRadius / AppMotion
    深色模式看過,文字對比度可接受

`^3\d\d,\d\d\d km$` says the Moon is between 300,000 and 399,999 km away.
It runs from about 356,500 km at perigee to about 406,700 km at apogee, so
that pattern is true for most of a lunar month and false near apogee — a
test that passes for three weeks and fails in the fourth, on nobody's
change. It failed today.

What the assertion is actually for is the formatting: a grouped number of
kilometres rather than a bare double. Six digits says that without also
asserting where the Moon is.
The first run of this step died on

    base64: stdin: (null): error decoding base64 input stream
    Error: Process completed with exit code 1

which names neither the secret nor the mistake, in a step whose whole job
is to stop a signing problem from being cryptic.

The value was a *path* rather than the file's contents. I could not find
any other input that produces that message: empty, wrapped lines, stray
spaces and even a PEM header all decode without complaint on macOS, so the
one thing it does say is the one thing it says badly.

So the decode is guarded and its result is checked. Whitespace is stripped
first, because a value that travelled through a browser text field arrives
with whatever that field did to it, and `base64 --decode` is not uniformly
forgiving about it across runner images. Then the bytes have to start 0x30,
the DER SEQUENCE tag — a .cer, a PEM or a truncated paste all reach
`security import` otherwise, and it answers "Unknown format in import",
which is the same problem one layer further down.
@whes1015
whes1015 merged commit 60d61fb into main Aug 19, 2026
6 checks passed
@whes1015
whes1015 deleted the fix/ios-cert-secret-guard branch August 19, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant