patchmldonkey, a multi-networks file-sharing client - Patches: patch #4928, BT: Fix invalid encoding in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4928: BT: Fix invalid encoding in announce URL

Submitter:  Bojidar Alexandrov <balexandrov>
Submitted:  Tue 21 Feb 2006 08:16:03 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Sat 25 Feb 2006 09:10:41 PM UTC, comment #9: 

Applied 4928_2.patch 2006/02/25

spiralvoice <spiralvoice>
Group administrator
Sat 25 Feb 2006 07:31:40 PM UTC, comment #8: 

args_in_url.patch patches the URL thingy to allow arguments to be passed in the URL and not just the args variable.
This replaces the earlier patch in bTClients.ml.

darkfader
Sat 25 Feb 2006 12:30:41 AM UTC, comment #7: 

these passkeys are f***ing crap
i think they violate the URI specifiations
http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#components
multiple '?' are not allowed

normal
http://foo.foo:port/foo?numwant=..&key=...

but with passkey the url should look like
http://foo.foo:port/foo.php?passkey=fookey?numwant=...
!this is against the standard

ATM the url looks like this
http://foo.foo:port/foo.php?passkey=fookey%3Fnumwant%3D..&key=..
this is standard, because but doesn't work with the tracker

I think the problem is in the url.ml
of_string line 232 and put_args

sorry, my ocaml is not so good to fix this
hope you can

orbit <orbit>
Tue 21 Feb 2006 11:45:29 PM UTC, comment #6: 

please revise,
some torrents don't connect to tracker
older cvs works fine

orbit <orbit>
Tue 21 Feb 2006 08:33:36 AM UTC, comment #5: 

Applied 2006/02/21

spiralvoice <spiralvoice>
Group administrator
Tue 21 Feb 2006 08:16:03 AM UTC, comment #4: 

This item has been reassigned from the project mldonkey, a multi-networks file-sharing client bugs tracker to your tracker.

The original report is still available at bugs #15506

Following are the information included in the original report:

[field #0]                  Item ID: 15506
[field #1]                 Group ID: 1409
[field #2]              Open/Closed: Open
[field #3]                 Severity: 3 - Normal
[field #4]                  Privacy: Public
[field #5]                    Votes: 150
[field #6]                 Category: Bittorrent-Plugin
[field #7]             Submitted by: balexandrov
[field #8]              Assigned to: None
[field #9]             Submitted on: So 22.01.2006 um 19:08
[field #10]                  Summary: Invalid encoding in announce URL
[field #11]      Original Submission: I have problem with one of the biggest trackers in our country (Bulgaria).
They use pass key added in announce URL. The problem is that MLDonkey incorrectly encode characters around name of IP parameter and it becomes like a part of the pass_key parameter.

/announce.php?pass_key=8b4964276457735433b3e69799979797%3Fip%3D62.204.114.97&numwant=100&key=2D4D4C322E372E322D97BBA3C46C43D99B32062B&info_hash=%AA%23%CEd%5D%DC%15%D7%DC%2C%AEa%AE%7C%E0n%23%CA%28Q&peer_id=-ML2.7.2-%97%BB%A3%C4lC%D9%9B2%06%2B&port=6882&uploaded=0&downloaded=0&left=1461958853&compact=1&event=started

Problem is these %3F and %3D around "ip" parameter. They are ? and = repectivelly. Yes it is not very correct to put ? there but there is no problem if I decode them and manually make the request.
As result of this problem I get "invalid pass_key" error from tracker and cannot download anything.
If someone know where to fix it (probably here bTClients.ml or bTProtocol.ml), please tell me I can recompile it from port s work directory.
[field #13]               Item Group: Program malfunction
[field #14]                   Status: None
[field #15]        Component Version: None
[field #16]         Platform Version: FreeBSD
[field #17]          Reproducibility: None
[field #18]               Size (loc): None
[field #19]            Fixed Release: None
[field #20]          Planned Release: None
[field #21]                   Effort: 0.00
[field #25]                 Priority: 5 - Normal
[field #28]         Percent Complete: 0%
[field #30]                  Release: 2.7.2
[field #31]                  Release: 2.7.2
[field #55]          Binaries Origin: CVS / Self compiled
[field #56]                 CPU type: Intel x86
[field #57]                      CPU: None
[field #58]     Custom Select Box #4: None
[field #59]     Custom Select Box #5: None
[field #60]     Custom Select Box #6: None
[field #61]     Custom Select Box #7: None
[field #62]     Custom Select Box #8: None
[field #63]     Custom Select Box #9: None
[field #64]    Custom Select Box #10: None

spiralvoice <spiralvoice>
Group administrator
Mon 20 Feb 2006 12:55:51 PM UTC, comment #3: 

This fix works for me :)

Bojidar Alexandrov <balexandrov>
Mon 20 Feb 2006 03:34:04 AM UTC, comment #2: 

I think the actual problem should be solved in the Url class. It should check if the URL already contains "?" plus some parameters and act accordingly.
What I did is hack in bTClients.ml:
              ...
              let module H = Http_client in
              let url = (t.tracker_url ^ if not (Str.string_match (Str.regexp "\\?") t.tracker_url 0) then "&" else "") in
              let r = {
              ...
This doesn't get rid of the "?" character the Url class is adding, but allows the tracker to read the passkey parameter correctly.

darkfader
Sun 22 Jan 2006 08:03:18 PM UTC, comment #1: 

If  force_client_ip is false, it does not send IP but the error appears with next parameter like this
/announce.php?pass_key=8b4964276457735433b3e69799979797%3Fnumwant%3D100&key=2D4D4C322E372E322D97BBA3C46C43D99B32062B&info_hash=%AA%23%CEd%5D%DC%15%D7%DC%2C%AEa%AE%7C%E0n%23%CA%28Q&peer_id=-ML2.7.2-%97%BB%A3%C4lC%D9%9B2%06%2B&port=6882&uploaded=0&downloaded=0&left=1461958853&compact=1&event=started

Bojidar Alexandrov <balexandrov>
Tue 21 Feb 2006 08:16:03 AM UTC, original submission:  

I have problem with one of the biggest trackers in our country (Bulgaria).
They use pass key added in announce URL. The problem is that MLDonkey incorrectly encode characters around name of IP parameter and it becomes like a part of the pass_key parameter.

/announce.php?pass_key=8b4964276457735433b3e69799979797%3Fip%3D62.204.114.97&numwant=100&key=2D4D4C322E372E322D97BBA3C46C43D99B32062B&info_hash=%AA%23%CEd%5D%DC%15%D7%DC%2C%AEa%AE%7C%E0n%23%CA%28Q&peer_id=-ML2.7.2-%97%BB%A3%C4lC%D9%9B2%06%2B&port=6882&uploaded=0&downloaded=0&left=1461958853&compact=1&event=started

Problem is these %3F and %3D around "ip" parameter. They are ? and = repectivelly. Yes it is not very correct to put ? there but there is no problem if I decode them and manually make the request.
As result of this problem I get "invalid pass_key" error from tracker and cannot download anything.
If someone know where to fix it (probably here bTClients.ml or bTProtocol.ml), please tell me I can recompile it from port's work directory.

Bojidar Alexandrov <balexandrov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #9612:  4928_2.patch added by spiralvoice (1KiB - application/octet-stream - merged version, removed bt_url.patch, applied args_in_url.patch)
file #9611:  args_in_url.patch added by darkfader (656B - application/octet-stream - patch to allow arguments already in URL)
file #9596:  bt_url.patch added by spiralvoice (817B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 9 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-02-25 spiralvoice Open/ClosedOpen Closed
2006-02-25 spiralvoice Attached File- Added 4928_2.patch, #5985
2006-02-25 darkfader Attached File- Added args_in_url.patch, #5984
2006-02-25 spiralvoice Open/ClosedClosed Open
2006-02-21 spiralvoice StatusNone Done
    Open/ClosedOpen Closed
2006-02-21 spiralvoice SummaryReassigned item: Invalid encoding in announce URL BT: Fix invalid encoding in announce URL
    Attached File- Added bt_url.patch, #5976
2006-02-21 spiralvoice Reassign itemFrom group mldonkey, a multi-networks file-sharing client, bugs tracker To group mldonkey, a multi-networks file-sharing client, patch tracker

Back to the top

Powered by Savane 3.13-bb6a.
Corresponding source code