Skip to content

Commit 5967fd8

Browse files
authored
fix(firebase_auth, ios): add missing uppercase W to nonce character set (#18775)
- The character set in `randomNonce` skipped `W` (...UVXYZ) - Generation uses rejection sampling against the set size, so the extra character introduces no bias
1 parent 90bea4e commit 5967fd8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/firebase_auth/firebase_auth/ios/firebase_auth/Sources/firebase_auth/FLTFirebaseAuthPlugin.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public class FLTFirebaseAuthPlugin: NSObject, FlutterPlugin, FLTFirebasePluginPr
214214

215215
func randomNonce(_ length: Int) -> String {
216216
precondition(length > 0)
217-
let characterSet = Array("0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._")
217+
let characterSet = Array("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._")
218218
var result = ""
219219
var remainingLength = length
220220
while remainingLength > 0 {

0 commit comments

Comments
 (0)