mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 12:34:17 +00:00
py-i2phosts-injector: fix splitting entries
Multiple split by '=' character may cause wrong hash addition because trailing '==' were stripped from base64 hash. These trailing '==' are used in ECDSA keys, see http://zzz.i2p/topics/1763
This commit is contained in:
parent
6045b31350
commit
1fbcdeb4bd
@ -75,7 +75,7 @@ for line in f:
|
||||
continue
|
||||
# strip trailing '\n'
|
||||
line = line.rstrip('\n')
|
||||
entry = line.split('=')
|
||||
entry = line.split('=', 1)
|
||||
try:
|
||||
hostname = validate_hostname(entry[0])
|
||||
base64 = validate_b64hash(entry[1], check_uniq=False) # don't require uniqueness
|
||||
|
Loading…
x
Reference in New Issue
Block a user