Poor duplicate torrent detection in takeupload.php
With TBDev.2009(Final).rev.295 I've noticed a lot of duplicate torrents being posted, which seemed like something which would be coded against so I checked takeupload.php and it has a basic mysql check to try and prevent it.
Code:
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, category, save_as, added, last_action, nfo, client_created_by) VALUES (" . I couldn't find anything on google suggesting a better way to do it, it's been an issue across versions, surely someone's done it better by now? :sos: |
well of course it uploads duplicate torrents if the name is changed even with a character.. let's say you have MyTorrent.h264, then someone uploads Mytorrent-h264/MyTorrent-H264.
if the name isn't the same as previous torrent uploaded it will be a duplicate i have changed in takeupload the punctuation and spaces. basically I inversed the code. where is space to be a punctuation so every torrent will get MyTorrent.h264.xxx.aac |
Just do a check info_hash.
they may change the name but that well stay the same. |
Quote:
Quote:
I'm wondering if there is a easy way to cross reference multiple values and form a better detection routine? 1. Don't allow duplicate hashes, this will reduce some dupes 2. Don't allow duplicate torrent names, maybe unless the new file size is larger? 3. Don't allow a file with the same size which loosely matches the same file name? No one method seems effective on its own. I wonder if creating an unique index on the size column would be too drastic? There's already one on info_hash and the torrent name, any idea what the odds of the file size being exactly the same is? |
All times are GMT +2. The time now is 15:13. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.