pulse-updates 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1630,8 +1630,14 @@ final class PulseRemoteLoader {
|
|
|
1630
1630
|
case "\r": result += "\\r"
|
|
1631
1631
|
case "\t": result += "\\t"
|
|
1632
1632
|
default:
|
|
1633
|
-
|
|
1634
|
-
|
|
1633
|
+
// Only real control characters are \u-escaped. `asciiValue` is nil for every
|
|
1634
|
+
// non-ASCII character, so `?? 0` collapsed each of them to 0 and rewrote it
|
|
1635
|
+
// as \u0000: the canonical form no longer matched what the server signed and
|
|
1636
|
+
// the manifest was refused ("Signature verification failed"). A single em
|
|
1637
|
+
// dash in a release message was enough to block an app's updates entirely.
|
|
1638
|
+
// Android's escapeJson never had this — it tests char.code < 32.
|
|
1639
|
+
if let ascii = char.asciiValue, ascii < 32 {
|
|
1640
|
+
result += String(format: "\\u%04x", ascii)
|
|
1635
1641
|
} else {
|
|
1636
1642
|
result.append(char)
|
|
1637
1643
|
}
|