Commit 2f4b435
committed
fix: error in decoding SECRET_APP_CONFIG
- This issue may fix #215 and #225
- The issue is:
1. On Ubuntu, base64 adds line breaks every 76 characters by default
2. When stored in GitHub Secrets, these newlines cause decoding issues
Solution:
- In update_config.sh: Use tr -d '\n' to remove newlines (cross-platform
compatible with both macOS and Linux)
- In workflow files: Add -i flag to ignore invalid characters during
decode (Linux only, which is fine since GitHub Actions uses
ubuntu-latest)
Why these fixes work:
1. Encoding fix (tr -d '\n'): On Ubuntu/Linux, base64 adds line breaks
every 76 characters by default. Using tr -d '\n' removes all newlines
and is compatible with both macOS and Linux (unlike -w 0 which only
works on Linux).
2. Decoding fix (-i flag): The -i flag tells base64 --decode to ignore
invalid input characters. This provides resilience against any stray
whitespace or other characters that might have been introduced during
secret storage.1 parent 16134ac commit 2f4b435
3 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments