mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
defender: allow to set a different score for "no auth tried" events
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1071,7 +1071,7 @@ func (s *httpdServer) handleClientUpdateShareGet(w http.ResponseWriter, r *http.
|
||||
if err == nil {
|
||||
share.HideConfidentialData()
|
||||
s.renderAddUpdateSharePage(w, r, &share, "", false)
|
||||
} else if _, ok := err.(*util.RecordNotFoundError); ok {
|
||||
} else if errors.Is(err, util.ErrNotFound) {
|
||||
s.renderClientNotFoundPage(w, r, err)
|
||||
} else {
|
||||
s.renderClientInternalServerErrorPage(w, r, err)
|
||||
@@ -1122,7 +1122,7 @@ func (s *httpdServer) handleClientUpdateSharePost(w http.ResponseWriter, r *http
|
||||
}
|
||||
shareID := getURLParam(r, "id")
|
||||
share, err := dataprovider.ShareExists(shareID, claims.Username)
|
||||
if _, ok := err.(*util.RecordNotFoundError); ok {
|
||||
if errors.Is(err, util.ErrNotFound) {
|
||||
s.renderClientNotFoundPage(w, r, err)
|
||||
return
|
||||
} else if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user