I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit dd4acc88 authored by zzz's avatar zzz
Browse files

i2psnark: Fix adding magnet links with % encoding (ticket #1391)

parent 6e566f6e
No related branches found
No related tags found
No related merge requests found
...@@ -931,13 +931,7 @@ public class I2PSnarkServlet extends BasicServlet { ...@@ -931,13 +931,7 @@ public class I2PSnarkServlet extends BasicServlet {
} else } else
*****/ *****/
if (newURL != null) { if (newURL != null) {
if (newURL.contains("<") || newURL.contains(">") || if (newURL.startsWith("http://")) {
newURL.contains("%3C") || newURL.contains("%3E") ||
newURL.contains("%3c") || newURL.contains("%3e") ||
newURL.contains("\"") || newURL.contains("'") ||
newURL.contains("%22") || newURL.contains("%27")) {
_manager.addMessage("Invalid URL");
} else if (newURL.startsWith("http://")) {
FetchAndAdd fetch = new FetchAndAdd(_context, _manager, newURL); FetchAndAdd fetch = new FetchAndAdd(_context, _manager, newURL);
_manager.addDownloader(fetch); _manager.addDownloader(fetch);
} else if (newURL.startsWith(MagnetURI.MAGNET) || newURL.startsWith(MagnetURI.MAGGOT)) { } else if (newURL.startsWith(MagnetURI.MAGNET) || newURL.startsWith(MagnetURI.MAGGOT)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment