Browse Source

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
pull/1/head
Hidden Z 9 years ago
parent
commit
1fbcdeb4bd
  1. 2
      bin/py-i2phosts-injector

2
bin/py-i2phosts-injector

@ -75,7 +75,7 @@ for line in f: @@ -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…
Cancel
Save