Travian Trooptool Updater

By Risi Last update Jul 29, 2009 — Installed 14,141 times.

bug with urls that contain "-"

in
Subscribe to bug with urls that contain "-" 2 posts, 2 voices



alkatraz User

One of my members pointed out and FIXED a bug in the script:

Bigweb wrote:

Just thought I would point out a bug in the auto troop tool using greasemonkey. Normally the script works fine, but the bug in the script is that it does not recognize dashes in the authentication key. So this character "-" is what is causing the script to not work.

To fix the script I edited this line in the script:

var re = /^http[s]?:\/\/[./?=&a-zA-Z0-9]*$/i;

to

var re = /^http[s]?:\/\/[\-./?=&a-zA-Z0-9]*$/i;

and now it works fine. Another work around would be that for the authenticaion key, the admins need to avoid using dashes so instead of having this as an authentication key:

http://xxxxxx/supertruppentool-loa/send.php?aut...

they would take the - out of supertruppentool-loa and make it supertruppentoolloa

If they did that, it would also fix the bug for everyone. Otherwise, the tool needs to be updated to support dashes in the authentication key.

I hope that helps you guys, you might need to fwd that info around or rewrite it.

Best Regards,
Bigweb

 
BtDaG User

This is the same for _ just add that into the same part.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel