|
#11
|
|||
|
|||
Quote:
|
The Following User Says Thank You to fireman For This Useful Post: | ||
z3ro (22nd April 2019)
|
#12
|
||||
|
||||
In announce.php, functions.php, and scrape.php there are references to get_magic_quotes_gpc(), which has been dead for a long time, but everything just worked since it returned false and moved on. It seems the new php 7.4 completely dont like this reference at all, so if you remove it, this code works on 7.4 as well. Im testing this on ubuntu 18.04.3lts and apache 2.4.41
Code:
function unesc($x) { if (get_magic_quotes_gpc()) return stripslashes($x); return $x; } Code:
function unesc($x) { return stripslashes($x); return $x; } and in scrape.php Code:
foreach (explode("&", $_SERVER["QUERY_STRING"]) as $item) { if (preg_match("#^info_hash=(.+)\$#", $item, $m)) { $hash = urldecode($m[1]); if (get_magic_quotes_gpc()) $info_hash = stripslashes($hash); else $info_hash = $hash; if (strlen($info_hash) == 20) $info_hash = bin2hex($info_hash); else if (strlen($info_hash) != 40) continue; $infohash[] = sqlesc(strtolower($info_hash)); } } Code:
foreach (explode("&", $_SERVER["QUERY_STRING"]) as $item) { if (preg_match("#^info_hash=(.+)\$#", $item, $m)) { $hash = urldecode($m[1]); $info_hash = stripslashes($hash); // $info_hash = $hash; if (strlen($info_hash) == 20) $info_hash = bin2hex($info_hash); else if (strlen($info_hash) != 40) continue; $infohash[] = sqlesc(strtolower($info_hash)); } } Last edited by MicroMonkey; 16th December 2019 at 04:46. |
The Following User Says Thank You to MicroMonkey For This Useful Post: | ||
STorrents2019 (20th February 2020)
|
#13
|
|||
|
|||
i can comfirm this how this should be in PHP7 done Also this will work in Over all PHP7 Platforms of 7.1 .7.2 7.3 so on
|
#14
|
||||
|
||||
only 7.4 has an issue with magic_quotes so far as I can tell. 7.3 and below does not, but I agree with napon, it should be removed.
|
#15
|
|||
|
|||
Quote:
have you set it as a class for this to work in 7.4 you should know alot as changed in the 7.4 use class functions trust me it will work i know ive just coder a mate site to 7.4 using TT code from base github...and set to mysqli |
#16
|
|||
|
|||
Quote:
|
#17
|
|||
|
|||
What are point of showing off if your not going to share the source code.
__________________
Live Free... Share Free... |
#18
|
|||
|
|||
I agree.
If your "private source" is just that...private...then it is only your version TT2.08, modded to suit your needs. If it is so heavily modded, maybe you should just rename to completely new source, create a support forums, and either share the basic code with paid mods...or just sell the thing...become another xam. |
#19
|
|||
|
|||
General thoughts
Quote:
My aim was not to be arrogant it was to let buddy there know he's an idiot blowing smoke out of his ass. Every time I visit this forum, which isn't often enough unfortunately, I'm invited to negativity from some asshole I'm reading about in a thread sounding like a small child who got onto their daddy's laptop. If things ever go rogue in the in the future, it just may see Github but that is unlikely. As always, a big shout out to those involved in the project. I don't share on here because it took maybe a month to manually enable my account for posting rights, in that time I already committed to xyz. Thats all for now. |
The Following User Says Thank You to STorrents2019 For This Useful Post: | ||
thartley55 (21st February 2020)
|
#20
|
|||
|
|||
Fair enough.
|
Thread Tools | |
|
|