forked from rDrama/rDrama
fix prev commit
parent
f074f465ec
commit
c4263c9439
|
@ -40,7 +40,6 @@ def login_deduct_when(resp):
|
||||||
|
|
||||||
@app.post("/login")
|
@app.post("/login")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
|
||||||
@limiter.limit(DEFAULT_RATELIMIT)
|
@limiter.limit(DEFAULT_RATELIMIT)
|
||||||
@auth_desired
|
@auth_desired
|
||||||
@limiter.limit("6/minute;10/day", deduct_when=login_deduct_when)
|
@limiter.limit("6/minute;10/day", deduct_when=login_deduct_when)
|
||||||
|
@ -202,7 +201,6 @@ def sign_up_get(v:Optional[User]):
|
||||||
|
|
||||||
@app.post("/signup")
|
@app.post("/signup")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
|
||||||
@limiter.limit("10/day")
|
@limiter.limit("10/day")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def sign_up_post(v:Optional[User]):
|
def sign_up_post(v:Optional[User]):
|
||||||
|
@ -377,7 +375,6 @@ def get_forgot():
|
||||||
|
|
||||||
@app.post("/forgot")
|
@app.post("/forgot")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
|
||||||
@limiter.limit(DEFAULT_RATELIMIT)
|
@limiter.limit(DEFAULT_RATELIMIT)
|
||||||
def post_forgot():
|
def post_forgot():
|
||||||
|
|
||||||
|
@ -444,7 +441,6 @@ def get_reset():
|
||||||
|
|
||||||
@app.post("/reset")
|
@app.post("/reset")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
|
||||||
@limiter.limit(DEFAULT_RATELIMIT)
|
@limiter.limit(DEFAULT_RATELIMIT)
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def post_reset(v:Optional[User]):
|
def post_reset(v:Optional[User]):
|
||||||
|
@ -492,7 +488,6 @@ def lost_2fa(v:Optional[User]):
|
||||||
|
|
||||||
@app.post("/lost_2fa")
|
@app.post("/lost_2fa")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
|
||||||
@limiter.limit("6/minute;200/hour;1000/day")
|
@limiter.limit("6/minute;200/hour;1000/day")
|
||||||
def lost_2fa_post():
|
def lost_2fa_post():
|
||||||
username=request.values.get("username")
|
username=request.values.get("username")
|
||||||
|
|
|
@ -386,7 +386,9 @@ def thumbnail_thread(pid:int, vid:int):
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
||||||
@limiter.limit(DEFAULT_RATELIMIT)
|
@limiter.limit(DEFAULT_RATELIMIT)
|
||||||
def is_repost():
|
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
|
||||||
|
@auth_required
|
||||||
|
def is_repost(v):
|
||||||
not_a_repost = {'permalink': ''}
|
not_a_repost = {'permalink': ''}
|
||||||
if not FEATURES['REPOST_DETECTION']:
|
if not FEATURES['REPOST_DETECTION']:
|
||||||
return not_a_repost
|
return not_a_repost
|
||||||
|
|
|
@ -353,7 +353,6 @@ def mobile_app(v:Optional[User]):
|
||||||
|
|
||||||
@app.post("/dismiss_mobile_tip")
|
@app.post("/dismiss_mobile_tip")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
|
||||||
@limiter.limit(DEFAULT_RATELIMIT)
|
@limiter.limit(DEFAULT_RATELIMIT)
|
||||||
def dismiss_mobile_tip():
|
def dismiss_mobile_tip():
|
||||||
session["tooltip_last_dismissed"] = int(time.time())
|
session["tooltip_last_dismissed"] = int(time.time())
|
||||||
|
|
|
@ -1403,7 +1403,6 @@ if KOFI_TOKEN:
|
||||||
|
|
||||||
@app.post("/gumroad")
|
@app.post("/gumroad")
|
||||||
@limiter.limit('1/second', scope=rpath)
|
@limiter.limit('1/second', scope=rpath)
|
||||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
|
||||||
@limiter.limit(DEFAULT_RATELIMIT)
|
@limiter.limit(DEFAULT_RATELIMIT)
|
||||||
def gumroad():
|
def gumroad():
|
||||||
data = request.values
|
data = request.values
|
||||||
|
|
Loading…
Reference in New Issue