Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

"m-jay, post: 66663, member: 20288":

The easiest way would be run a sql query to empty the passwords in the table and ask members on the login page to use recover password to make a new one,
They is a few examples of converting old md5 passwords on stack overflow so I'll check for anything that might be helpfull the main part now is testing members can use recovery

That could be a troublesome for big sites
Great progress so far! how about the conversion of old md5 passwords for the current users?
[USER=311]@MicroMonkey[/USER]   password_default may change over time we need to use a fixed method PASSWORD_BCRYPT, $options and let admins declare the cost. Glad that you have been working on it
[USER=311]@MicroMonkey[/USER] [USER=20288]@m-jay[/USER] [USER=3]@Munk[/USER] [USER=1]@DarkMaster[/USER]

This is a real security issue with torrenttrader. Storing passwords as md5 or sha1, or hmac is a GREAT security problem and will take less than 1 minute to decrypt those passwords.

We need to implement for example: bcrypt or sha512_bcrypt or argon2 encryption methods to enhance the security of the users and administrators at the same time if the site gets breached.

https://www.php.net/manual/en/function.password-hash.php <- here is a manual of implementing bcrypt as it is built-in for PHP.

PS: Cryptographically Argon2i and Argon2id are somewhat more strong than bcrypt hashing.

Argon2i requires PHP 7.2 >= and Argon2id PHP 7.3 >=.

We can add default value for Argon or bcrypt cost and explain that higher number = better security, but slower performance.

Also, we need auto-generated salt for passwords.

Lastly:
We need to include an option to rewrite new hash method for existing users when they login with plain password in login form.

If we make this, torrenttrader can be really safe for use.

Example: http://john.cuppi.net/migrate-from-md5-to-bcrypt-password-hashes/
Like most of you know MyISAM is now nowhere good as InnoDB and it will only cause lower performance in term of write/read of large databases.

I run a separate server only for SQL database and had to change all tables to InnoDB due to poor performance.

This boosted performance for over 150% in my case.

In SQL run the following code:
SET @DATABASE_NAME = 'name_of_your_db';

SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM    information_schema.tables AS tb
WHERE   table_schema = @DATABASE_NAME
AND     `ENGINE` = 'MyISAM'
AND     `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;


Change name_of_your_db with your database name.

Now, the output will show you a list of all tables with commands like ALTER `announce` ENGINE =...

Copy all of them and run the following code:
USE `your_database_name`;
paste here all the tables you got from the previous code.
// remove ";" from the last ALTER input.


After that, you should have successfully swapped from MyISAM to InnoDB engine.
Use the anti-flood plugin. (it will not work for new threads only)
Anti-Flood [TTv3] — 2019-05-28 16:46:01 in v3 Mods Completed
[USER=20288]@m-jay[/USER] seems like there is a bug with new topic in forum anti-flood. If the topic is created it will show error message for anti-flood but will post a new thread from "deluser" with no post message. We need to include new topic too.
Confirmation email — 2019-05-28 12:10:51 in v2.08 Support
Not possible to debug without SQL preview, site url and mods installed, because your ID column seems to be misconfigured for users somehow.
"MicroMonkey, post: 66638, member: 311":

so does this work correctly? I assume there will always be a file called duplicate.torrent and it just gets overwritten each time? If so, nice job :) Thanks for sharing

Indeed that's how it works.
[USER=311]@MicroMonkey[/USER] there is a brute-force here with this captcha. The form is checking if password or username is correct before asking for captcha so attacker can run brute-force until they find a right password.

Fix:
in the code find and delete

  if(!$captcha){
         $message = '<h2>Please check the the captcha form.</h2>';
         header("Refresh: 1; url= account-login.php");
       }


Now above
if ( ! $row || $row["password"] != $password )

Add the code which you deleted:
 if(!$captcha){

         $message = '<h2>Please check the the captcha form.</h2>';

         header("Refresh: 1; url= account-login.php");

       }


And this will solve brute-force attacks :)
Current code in torrents-upload.php is adding duplicate torrents and wasting the space of web server in advance.

This is a simple fix which will create a new file duplicate.torrent and store / erase there every duplicated torrent without making multiple of them.

1. Open torrents-upload.php and find the following part:
if (mysqli_errno($GLOBALS["DBconnector"]) == 1062)
show_error_msg(T_("UPLOAD_FAILED"), T_("UPLOAD_ALREADY_UPLOADED"), 1);

Replace with:
if (mysqli_errno($GLOBALS["DBconnector"]) == 1062) {
   rename("$torrent_dir/$fname", "$torrent_dir/duplicate.torrent");  
   show_error_msg(T_("UPLOAD_FAILED"), T_("UPLOAD_ALREADY_UPLOADED"), 1);
   }
So there is one very useless and memory hungry function which logs every visitor IP for I don't know what reason. By deleting that function you will free up a lot of space.

1. In functions.php find:
guestadd();
Replace with
htmlspecialchars($title);

2. Stil in functions.php find
function guestadd() {
   $ip = $_SERVER['REMOTE_ADDR'];
   $time = gmtime();
   SQL_Query_exec("INSERT INTO `guests` (`ip`, `time`) VALUES ('$ip', '$time') ON DUPLICATE KEY UPDATE `time` = '$time'");
}
                             
function getguests() {
   $past = (gmtime() - 2400);
   SQL_Query_exec("DELETE FROM `guests` WHERE `time` < $past");
   return get_row_count("guests");
}

and remove it.

3. In SQL you can run a query to remove all logged guests IPs.
DROP TABLE guests;
In functions you have a "case: name" and below column limit which shortens the text, increase it to 200 or so and you will have a full title
"m-jay, post: 66617, member: 20288":

I'll have a look at this some point this week it should be input username but it would be better if once you type a letter it would recommend names, this helps with spelling so you don't get errors by users

The problem is messages table in SQL doesn't contain the username, only ID. So we can't return username. (Sender is also an ID from the user who sent pm)


$arr[username] will get the username when inputed into the box, but pm will not be sent because it is uknown as username is not defined for sender and id.
Bumping this.
Bumping this [USER=311]@MicroMonkey[/USER] / [USER=20288]@m-jay[/USER] any suggestion?

$_GET[$user[name]] must be defined if we change it to input field so when a user enters username it should take it as a get. (right now it must input user ID number)
Anti-Flood [TTv3] — 2019-05-20 19:11:11 in v3 Mods Completed
[USER=20288]@m-jay[/USER] i forgot to post here a fix and you can add this in completed.

In torrents-details.php find
if (!$body)

show_error_msg...


Below that add
//===| Anti-Flood

   if ( strlen($body) > $site_config['floodsize'] )

       show_error_msg("Error", "Your comment is too big, only $site_config[floodsize] characters are allowed.", 1);



   $res = SQL_Query_exec("SELECT COUNT(*) FROM `comments` WHERE user = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config["floodtime"] * 60)) . "'");

   $row = mysqli_fetch_row($res);

   if ($row[0] > $site_config["floodlimit"])

       show_error_msg("Error", "You are only prohibited $site_config[floodlimit] comments in $site_config[floodtime] minutes.", 1);

   //===| End
Then you didn't put it correctly.

Find part where bbcodes are defined in functions.php and add below the code.

Find the part where the last break; in bbcode.php has been defined and add below the code
Functions.php
// 
text

   $s = preg_replace("/\[center\]((\s|.)+?)\[\/center\]/", "<center>\\1</center>", $s);

bbcode.php
 case '
':
   var start = document.forms[form].elements[text].selectionStart;
   var end = document.forms[form].elements[text].selectionEnd;
   if (start != end) {
       var body = document.forms[form].elements[text].value;
       var left = body.substr(body, start);
       var middle = "[center]" + body.substring(start, end) + "
";
       var right = body.substr(end, body.length);
       document.forms[form].elements[text].value = left + middle + right;
   } else {
       document.forms[form].elements[text].value = document.forms[form].elements[text].value + "
";
   }
       break;
"spiritblue, post: 66595, member: 401":

ok(y), but on my side I remove "async defer" and it does not change anything :rolleyes:

it doesn't suppose to change anything.

  • Async scripts are executed as soon as the script is loaded, so it doesn't guarantee the order of execution (a script you included at the end may execute before the first script file )
  • Defer scripts guarantees the order of execution in which they appear in the page.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728