View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001699aMuleMiscpublic2011-11-28 08:562011-11-28 08:56
Reportertgckpg 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
PlatformOSOS Version
Product Version2.3.1 
Target VersionFixed in Version 
Summary0001699: Strange behavior on amuleweb-php split
DescriptionI'd try to make amuleweb being able to download multiple links.

These links were tested:

ed2k://|file|%5BWindows7%E9%A2%98%E6%9D%90%E9%AB%98%E6%B8%85%E5%A3%81%E7%BA%B8%281%E5%88%B08%E8%BE%91%29%5D.Windows7.rar|25160468|ae4f1fe47b8cbcf596f3590124936857|h=fubd3jlp3nwatefixlrf6kunhqygxx3o|/ [^]
ed2k://|file|16%EF%BC%9A10.rar|10336320|a7ecba18a538b04dcf31084b25ace2df|h=jg6h7g7bgj2izoerlutnwxxluknyrgtf|/ [^]
ed2k://|file|4%EF%BC%9A3.rar|6734807|8fca263151a5f3b66a35b44ba11eac8a|h=ftm6vt4mavbmjj4ld2va3essskktysr5|/ [^]
ed2k://|file|5%EF%BC%9A4.rar|762055|555311f922d5b6487c91b3aa93a95540|h=a4mtpbleldjffvxh2aagtee2jopewj7b|/ [^]
<---Note that there is an "\n" char here.


Simply changed the code with using a textarea:

if (($HTTP_GET_VARS['cmd'] == 'download' ) && ($_SESSION["guest_login"] == 0)) {
    $links = $HTTP_GET_VARS['ed2klink'];
    $sLinkArr = split("<SplitMe>", $links);
    $target_cat_idx = cat2idx($HTTP_GET_VARS['cat']);
    foreach ($sLinkArr as $link) {
        if ( strlen($link) > 0 ) {
            amule_do_ed2k_download_cmd($link, $target_cat_idx);
        }
    }
}
    
And before submit the links, there were an js decode the strings first:

function onSubmited2k(linkData) {
        ed2klinks = document.getElementById("ed2klinks");
        ed2klinks.value = decodeURI(ed2klinks.value.replace("\n", "<SplitMe>"));
}
Additional InformationExpected should work normally but the log file is shown:

!2011-11-28 15:48:22: ExternalConn: adding link 'ed2k://|file|[Windows7??????(1?8?)].Windows7.rar|25160468|ae4f1fe47b8cbcf596f3590124936857|h=fubd3jlp3nwatefixl'. [^]
!2011-11-28 15:48:22: Invalid eD2k link! ERROR: Invalid master-hash
!2011-11-28 15:48:22: ExternalConn: adding link 'gxx3o|/'.
!2011-11-28 15:48:22: Unknown protocol of link: gxx3o|/
!2011-11-28 15:48:22: ExternalConn: adding link 'ed2k://|file|16:10.rar|10336320|a7ecba18a538b04dcf31084b25ace2df|h=jg6h7g7bgj2izoerlutnwxxluknyrgtf|/ [^]
!2011-11-28 15:48:22: ed2k://|file|4:3.rar|6734807|8fca263151a5f3b66a35b44ba11eac8a|h=ftm6vt4mavbmjj4ld2va3essskktysr5|/ [^]
!2011-11-28 15:48:22: ed2k://|file|5:4.rar|762055|555311f922d5b6487c91b3aa93a95540|h=a4mtpbleldjffvxh2aagtee2jopewj7b|/ [^]
!2011-11-28 15:48:22: '.
!2011-11-28 15:48:22: Downloading 16:10.rar
TagsNo tags attached.
Fixed in Revision
Operating SystemDebian
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-11-28 08:56 tgckpg New Issue
2011-11-28 08:56 tgckpg Operating System => Debian


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker