aMule Bug Tracker - aMule | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000045 | aMule | Misc | public | 2004-05-02 03:03 | 2004-05-20 13:08 |
Reporter | Batman | ||||
Assigned To | Xaignar | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Fixed in Revision | |||||
Operating System | |||||
Summary | 0000045: Simple quote pb in URL (for fake check) | ||||
Description | This file with a quote in its name generate a bad URL : hash : a0f19f46dddbad04c7ca6da8b5e2debc title : L'Evadé.D.'alcatraz.BivX.By.SENSATION.trouvé.sur.rave-zone.net.avi It's better replacing all special chars. Actually, it's better keepping only the one we know being OK ! We keep only letters, numbers, and some chars as -_:/|%. My CamuleApp::GenFakeCheckUrl() follows. Source file is amule.cpp. | ||||
Steps To Reproduce | |||||
Additional Information | // Generates an URL for checking if a file is "fake" wxString CamuleApp::GenFakeCheckUrl(CAbstractFile *f) { wxString strURL = "http://donkeyfakes.gambri.net/fakecheck/update/fakecheck.php?ed2k="; [^] wxString strED2kURL = CreateED2kLink( f ); //printf ("Init URL : %s\n",strED2kURL.ToAscii()); // Various symbols don't work in URLs... keep only the ones we know being OK for (int i=32 ; i <256 ; i++) { if ( ! (i=='-' || i=='_' || i=='.' || i=='|' || i=='%' || i==':' || i=='/' || (i>='a' && i<='z') || (i>='A' && i<='Z') || (i>='0' && i<='9')) ) { char ascii_code[3]; memset(ascii_code,0,3); sprintf(ascii_code,"%x",i); //printf("Replace char %c with hex %s\n",(char)i,ascii_code); strED2kURL.Replace(wxString((char)i),"%"+wxString(ascii_code)); } //else printf("char %c not changed\n",(char)i); } //printf ("End URL : %s\n",strED2kURL.ToAscii()); strURL += strED2kURL; return strURL; } | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2004-05-02 03:03 | Batman | New Issue | |||
2004-05-03 18:29 | Xaignar | Status | new => assigned | ||
2004-05-03 18:29 | Xaignar | Assigned To | => Xaignar | ||
2004-05-20 12:41 | Xaignar | Note Added: 0000058 | |||
2004-05-20 13:08 | Xaignar | Status | assigned => resolved | ||
2004-05-20 13:08 | Xaignar | Resolution | open => fixed | ||
2004-05-20 13:08 | Xaignar | Note Added: 0000059 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|