mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-05 22:10:11 +00:00
Empty commit
This commit is contained in:
parent
ba0b51ef98
commit
caa2876f8c
@ -6,6 +6,9 @@
|
|||||||
'flac', 'gif', 'htm', 'html', 'jpeg', 'jpg', 'lit', 'log', 'm3u', 'm3u8', 'm4a', 'm4b',
|
'flac', 'gif', 'htm', 'html', 'jpeg', 'jpg', 'lit', 'log', 'm3u', 'm3u8', 'm4a', 'm4b',
|
||||||
'md5', 'mobi', 'mp3', 'mp4', 'nfo', 'pdf', 'pls', 'png', 'rtf', 'sfv', 'txt'),
|
'md5', 'mobi', 'mp3', 'mp4', 'nfo', 'pdf', 'pls', 'png', 'rtf', 'sfv', 'txt'),
|
||||||
true);
|
true);
|
||||||
|
$BadExtensions = array_fill_keys(array(
|
||||||
|
'torrent'
|
||||||
|
), true);
|
||||||
$Keywords = array(
|
$Keywords = array(
|
||||||
'ahashare.com', 'demonoid.com', 'demonoid.me', 'djtunes.com', 'h33t', 'housexclusive.net',
|
'ahashare.com', 'demonoid.com', 'demonoid.me', 'djtunes.com', 'h33t', 'housexclusive.net',
|
||||||
'limetorrents.com', 'mixesdb.com', 'mixfiend.blogstop', 'mixtapetorrent.blogspot',
|
'limetorrents.com', 'mixesdb.com', 'mixfiend.blogstop', 'mixtapetorrent.blogspot',
|
||||||
@ -46,15 +49,21 @@ function check_name($Name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function check_extensions($Type, $Name) {
|
function check_extensions($Type, $Name) {
|
||||||
global $MusicExtensions, $ComicsExtensions;
|
global $MusicExtensions, $ComicsExtensions, $BadExtensions;
|
||||||
|
|
||||||
|
$extension = get_file_extension($Name);
|
||||||
if ($Type == 'Music' || $Type == 'Audiobooks' || $Type == 'Comedy' || $Type == 'E-Books') {
|
if ($Type == 'Music' || $Type == 'Audiobooks' || $Type == 'Comedy' || $Type == 'E-Books') {
|
||||||
if (!isset($MusicExtensions[get_file_extension($Name)])) {
|
if (!isset($MusicExtensions[$extension])) {
|
||||||
invalid_error($Name);
|
invalid_error($Name);
|
||||||
}
|
}
|
||||||
} elseif ($Type == 'Comics') {
|
} elseif ($Type == 'Comics') {
|
||||||
if (!isset($ComicsExtensions[get_file_extension($Name)])) {
|
if (!isset($ComicsExtensions[$extension])) {
|
||||||
invalid_error($Name);
|
invalid_error($Name);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($BadExtensions[$extension])) {
|
||||||
|
forbidden_error($Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
CHANGE LOG
|
CHANGE LOG
|
||||||
|
|
||||||
|
2015-11-20 by lawnmower
|
||||||
|
Add extension blacklist for uploaded torrents
|
||||||
|
|
||||||
2015-11-19 by lawnmower
|
2015-11-19 by lawnmower
|
||||||
Fix several XSS and SQLi vulerabilities
|
Fix several XSS and SQLi vulerabilities
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user