Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Merge pull request #359 from sfan5/memez

Fixes
Cette révision appartient à :
PantsuDev 2017-05-11 23:25:31 +10:00 révisé par GitHub
révision 5689275c3f
3 fichiers modifiés avec 27 ajouts et 0 suppressions

Voir le fichier

@ -41,11 +41,13 @@ func PostCommentHandler(w http.ResponseWriter, r *http.Request) {
if strings.TrimSpace(r.FormValue("comment")) == "" { if strings.TrimSpace(r.FormValue("comment")) == "" {
http.Error(w, "comment empty", 406) http.Error(w, "comment empty", 406)
return
} }
userCaptcha := captcha.Extract(r) userCaptcha := captcha.Extract(r)
if !captcha.Authenticate(userCaptcha) { if !captcha.Authenticate(userCaptcha) {
http.Error(w, "bad captcha", 403) http.Error(w, "bad captcha", 403)
return
} }
currentUser := GetUser(r) currentUser := GetUser(r)
content := p.Sanitize(r.FormValue("comment")) content := p.Sanitize(r.FormValue("comment"))
@ -76,6 +78,7 @@ func ReportTorrentHandler(w http.ResponseWriter, r *http.Request) {
userCaptcha := captcha.Extract(r) userCaptcha := captcha.Extract(r)
if !captcha.Authenticate(userCaptcha) { if !captcha.Authenticate(userCaptcha) {
http.Error(w, "bad captcha", 403) http.Error(w, "bad captcha", 403)
return
} }
currentUser := GetUser(r) currentUser := GetUser(r)

Voir le fichier

@ -590,5 +590,17 @@
{ {
"id": "torrent_status_remake", "id": "torrent_status_remake",
"translation": "Remake" "translation": "Remake"
},
{
"id": "seeders",
"translation": "Seeder"
},
{
"id": "leechers",
"translation": "Leecher"
},
{
"id": "completed",
"translation": "Komplett"
} }
] ]

Voir le fichier

@ -606,5 +606,17 @@
{ {
"id":"date_format", "id":"date_format",
"translation": "2006-01-02 15:04" "translation": "2006-01-02 15:04"
},
{
"id": "seeders",
"translation": "Seeders"
},
{
"id": "leechers",
"translation": "Leechers"
},
{
"id": "completed",
"translation": "Completed"
} }
] ]