mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-16 00:09:05 +00:00
[Config change] Upload ratelimit for non-trusted uploaders (#384)
* Implement upload ratelimit for non-trusted uploaders Users may upload X torrents in Y minutes after which they will have to wait Z minutes between uploads. * Show torrent period count when ratelimited * Only ratelimit new accounts
This commit is contained in:
committed by
Arylide
parent
37546354a7
commit
de1fd2f1bc
@@ -323,6 +323,8 @@ class UploadForm(FlaskForm):
|
||||
Length(max=10 * 1024, message='Description must be at most %(max)d characters long.')
|
||||
])
|
||||
|
||||
ratelimit = HiddenField()
|
||||
|
||||
def validate_torrent_file(form, field):
|
||||
# Decode and ensure data is bencoded data
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user