mirror of
https://github.com/go-i2p/goSam.git
synced 2025-07-13 14:18:25 -04:00
replyParser had a bug where, when a base64 address ended with '==', the key-value pairs would break. I worked around the issue by switching '==' it with a non-base64 character before the split, and back after.
This commit is contained in:
@ -50,7 +50,8 @@ func parseReply(line string) (*Reply, error) {
|
||||
}
|
||||
|
||||
for _, v := range parts[2:] {
|
||||
kvPair := strings.Split(v, "=")
|
||||
kvPair := strings.Split(strings.Replace(v, "==", "%", -1), "=")
|
||||
kvPair[1] = strings.Replace(kvPair[1], "%", "==", -1)
|
||||
if len(kvPair) != 2 {
|
||||
return nil, fmt.Errorf("Malformed key-value-pair.\n%s\n", kvPair)
|
||||
}
|
||||
|
Reference in New Issue
Block a user