Commit 49171067 authored by Max Lv's avatar Max Lv

Fix #1111

parent 24c6aca8
...@@ -34,7 +34,7 @@ object Parser { ...@@ -34,7 +34,7 @@ object Parser {
pattern.findAllMatchIn(if (data == null) "" else data).map(m => { pattern.findAllMatchIn(if (data == null) "" else data).map(m => {
val uri = Uri.parse(m.matched) val uri = Uri.parse(m.matched)
uri.getUserInfo match { uri.getUserInfo match {
case null => uri.getHost match { case null => new String(Base64.decode(uri.getHost, Base64.NO_PADDING), "UTF-8") match {
case legacyPattern(_, method, password, host, port) => // legacy uri case legacyPattern(_, method, password, host, port) => // legacy uri
val profile = new Profile val profile = new Profile
profile.method = method.toLowerCase profile.method = method.toLowerCase
...@@ -49,7 +49,7 @@ object Parser { ...@@ -49,7 +49,7 @@ object Parser {
null null
} }
case userInfo => case userInfo =>
new String(Base64.decode(userInfo, Base64.NO_PADDING | Base64.NO_WRAP | Base64.URL_SAFE)) match { new String(Base64.decode(userInfo, Base64.NO_PADDING | Base64.NO_WRAP | Base64.URL_SAFE), "UTF-8") match {
case userInfoPattern(method, password) => case userInfoPattern(method, password) =>
val profile = new Profile val profile = new Profile
profile.method = method profile.method = method
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment