révision
5689275c3f
3 fichiers modifiés avec 27 ajouts et 0 suppressions
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Référencer dans un nouveau ticket