fix remove fail2ban
This commit is contained in:
parent
02c7c97f68
commit
bd95dd8ffd
|
@ -15,7 +15,7 @@
|
||||||
<h2>Change Password</h2>
|
<h2>Change Password</h2>
|
||||||
<form action="/changePassword" method="post">
|
<form action="/changePassword" method="post">
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label for="user">User: (without domain)</label>
|
<label for="user">User:</label>
|
||||||
<input type="text" id="user" name="user" required>
|
<input type="text" id="user" name="user" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
|
|
|
@ -33,9 +33,9 @@ func (handler ProsodyHandler) Post(c *fiber.Ctx) error {
|
||||||
User: c.FormValue("user", ""),
|
User: c.FormValue("user", ""),
|
||||||
}
|
}
|
||||||
if err := handler.prosodyService.ChangePassword(req.User, req.CurrentPassword, req.NewPassword); err != nil {
|
if err := handler.prosodyService.ChangePassword(req.User, req.CurrentPassword, req.NewPassword); err != nil {
|
||||||
for _, ip := range c.IPs() {
|
// for _, ip := range c.IPs() {
|
||||||
handler.fail2banSrv.FailedAttempt(ip)
|
// handler.fail2banSrv.FailedAttempt(ip)
|
||||||
}
|
// }
|
||||||
return RenderError(c, fmt.Errorf("ChangePassword: %w", err), defaultErrMessage)
|
return RenderError(c, fmt.Errorf("ChangePassword: %w", err), defaultErrMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ func (s *RestServer) Start(apiPort, views string) error {
|
||||||
})
|
})
|
||||||
|
|
||||||
s.app.Use(limiter.New(limiter.Config{
|
s.app.Use(limiter.New(limiter.Config{
|
||||||
Max: 5,
|
Max: 8,
|
||||||
Expiration: 1 * time.Hour,
|
Expiration: 30 * time.Minute,
|
||||||
LimiterMiddleware: limiter.SlidingWindow{},
|
LimiterMiddleware: limiter.SlidingWindow{},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue