Skip to content

Commit

Permalink
Remove referer filter on deletePassword endpoint (#7749)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehir authored May 6, 2024
1 parent 52d9093 commit 0fa6129
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions rest_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2727,16 +2727,10 @@ int DeRestPluginPrivate::changePassword(const ApiRequest &req, ApiResponse &rsp)
*/
int DeRestPluginPrivate::deletePassword(const ApiRequest &req, ApiResponse &rsp)
{
// reset only allowed for certain referers
bool ok = true;
QString referer = req.hdr.value(QLatin1String("Referer"));
if (referer.isEmpty() || !(referer.contains(QLatin1String("login.html")) || referer.contains(QLatin1String("login2.html"))))
{
ok = false;
}

// reset only allowed within first 10 minutes after startup
if (ok && getUptime() > 600)
if (getUptime() > 600)
{
ok = false;
}
Expand Down

0 comments on commit 0fa6129

Please sign in to comment.