Code to remove keys from tracker links

somus1735

Member
May 25, 2018
833
0
16
Hello me and a friend made a little code to remove any secret keys from tracker links

Row 791 in js/webui.js
Code:
var pattern = new RegExp("^https?://[a-z0-9]*\.?[a-z0-9\-]+\.[a-z0-9\:]+\/","i");
var resultat = pattern.exec(trk['name']);
trk['name'] = resultat[0];
Maybe some dev want to integrate this into the next version also ?

[edit] There is some other way it collects the data for the general tab, but it seems to be overwritten when some asyncron read is done. i havent found out how it collects the first value yet.

/Znubbis
 

dsouvik215

Member
May 25, 2018
896
0
16
what is the reason for this? i dont' quite see the point.


(not meant as an insult, meant as an honest question, why is this needed exactly?)
 

das329717

Member
May 25, 2018
928
0
16
i think he only want hide the passkey in tracker tab. As this we cannot stole it. But if he want remove it from the .torrent, it's not a good choise because it will not work anymore...
 

shwetha17

Member
May 24, 2018
785
0
16
We have a multi user system with around 15 users, thats why I removed it.
Not that I think anyone will try anything but its still better that its not there.

Beside that it looks cleaner without it smiley.gif
 

dsouvik215

Member
May 25, 2018
896
0
16
if the multi user system is set up properly it should be one user with hsi own rtorrent instance, are you saying you have 15 users sharing a single login?

that's strange =)

cool deal though, it does look cool
 

das329717

Member
May 25, 2018
928
0
16
Aye all use the same rtorrent.

A small fix for the above if someone plan to use it smiley.gif

Code:
var pattern = new RegExp("^https?://[a-z0-9]*\.?[a-z0-9\-]+\.[a-z0-9\:]+\/","i");
var resultat = pattern.exec(trk['name']);
try { trk['name'] = resultat[0]; }
catch(err){}
 

jith45

Member
May 25, 2018
960
0
16
Next fix smiley.gif


Code:
var pattern = new RegExp("^https?://[a-z0-9]*\.?[a-z0-9\-]+\.[a-z0-9\:]+\/","i");
var resultat = pattern.exec(trk['name']);
try {
if (resultat )
trk['name'] = resultat[0];
}
catch(err){}