aMule Bug Tracker - aMule | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0001651 | aMule | External Conn | public | 2011-02-05 08:39 | 2011-03-09 14:41 |
Reporter | moo | ||||
Assigned To | sturedman | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | 2.2.6 | ||||
Target Version | 2.3.1 | Fixed in Version | 2.3.1 | ||
Fixed in Revision | 10485 | ||||
Operating System | Any | ||||
Summary | 0001651: long url from amulecmd result in "Not a valid file link" | ||||
Description | # amulecmd aMulecmd$ add ed2k://|file|%5B%E6%89%B9%E5%88%A4%E6%80%A7%E6%8E%A8%E7%90%86%E5%85%A5%E9%97%A8%EF%BC%9A%E6%80%8E%E4%B9%88%E6%A0%B7%E6%89%8D%E6%98%AF%E5%A5%BD%E7%9A%84%E8%AE%BA%E8%AF%81%EF%BC%9F%E6%AD%A3%E7%A1%AE%E7%9A%84%E7%9C%9F%E5%AE%9E%E7%9A%84%5D.04.blablablablablablablablablablablablablalba.mp4|440999999|000000000000000000000000000000000|/ [^] > Request failed with the following error: Invalid link or already on list. tail .aMule/logfile !2011-02-05 15:14:18: Invalid eD2k link! ERROR: Not a valid file link: ed2k://|file|%5B%E6%89%B9%E5%88%A4%E6%80%A7%E6%8E%A8%E7%90%86%E5%85%A5%E9%97%A8%EF%BC%9A%E6%80%8E%E4%B9%88%E6%A0%B7%E6%89%8D%E6%98%AF%E5%A5%BD%E7%9A%84%E8%AE%BA%E8%AF%81%EF%BC%9F%E6%AD%A3%E7%A1%AE%E7%9A%84%E7%9C%9F%E5%AE%9E%E7%9A%84%5D.04.Blablablablabla/ [^] you can see the link in log because i modify the following line in ED2KLink.cpp throw wxString(wxT("Not a valid file link: ")) + link; <- added " + link" the problem comes from ExternalConnector.cpp void CaMuleExternalConnector::TextShell(const wxString &prompt) { char buffer[256]; wxString buf; bool The_End = false; do { GetCommand(prompt, buffer, 256); buf = char2unicode(buffer); The_End = Parse_Command(buf); } while ((!The_End) && (m_ECClient->IsSocketConnected())); } by changing 256 to some value bigger like 2048 "fixed" the problem, however i cannot guarantee that 2048 is enough for NTFS, max filename length is 256 * sizeof(wchar_t) "UTF-16, 2bytes for each wchar_t exactly), and for ext3 it's almost 256 * sizeof(char) 256 UTF-16 chars can be translated to 256*4 UTF-8 chars, and after urlencode it's 256*4*3, plus "add ", "ed2k://file [^] blahblah". let's say 256*4*3+256 = 3328 is safe, which round up to 4096 :) btw, it would be nice if you use sizeof() instead of number in GetCommand(prompt, buffer, 256) although the size is near | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-02-05 08:39 | moo | New Issue | |||
2011-02-05 08:39 | moo | Operating System | => Any | ||
2011-03-09 14:38 | sturedman | Fixed in Revision | => 10485 | ||
2011-03-09 14:38 | sturedman | Note Added: 0003541 | |||
2011-03-09 14:38 | sturedman | Assigned To | => sturedman | ||
2011-03-09 14:38 | sturedman | Severity | major => minor | ||
2011-03-09 14:38 | sturedman | Status | new => resolved | ||
2011-03-09 14:38 | sturedman | Resolution | open => fixed | ||
2011-03-09 14:38 | sturedman | Fixed in Version | => 2.3.1 | ||
2011-03-09 14:38 | sturedman | Target Version | => 2.3.1 | ||
2011-03-09 14:39 | sturedman | Status | resolved => feedback | ||
2011-03-09 14:39 | sturedman | Resolution | fixed => reopened | ||
2011-03-09 14:41 | sturedman | Note Added: 0003542 | |||
2011-03-09 14:41 | sturedman | Status | feedback => resolved | ||
2011-03-09 14:41 | sturedman | Resolution | reopened => fixed | ||
2011-03-09 14:41 | sturedman | Description Updated |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|