SHA256
Исправить pairing без пароля и убрать фантомные заявки
This commit is contained in:
@@ -112,7 +112,7 @@ public final class EspPairingRequestsDAO {
|
||||
FROM esp_pairing_requests
|
||||
WHERE login = ? COLLATE NOCASE
|
||||
AND expires_at_ms > ?
|
||||
AND status IN ('created', 'approved', 'rejected')
|
||||
AND status = 'created'
|
||||
ORDER BY created_at_ms DESC
|
||||
""";
|
||||
List<EspPairingRequestEntry> list = new ArrayList<>();
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class Net_StartEspPairing_Handler implements JsonMessageHandler {
|
||||
String canonicalLogin = user.getLogin();
|
||||
|
||||
EspPairingSettingsEntry settings = EspPairingSettingsDAO.getInstance().getByLogin(canonicalLogin);
|
||||
if (settings == null || !settings.isEnabled() || settings.getPasswordHash() == null || settings.getPasswordHash().isBlank()) {
|
||||
if (settings == null || !settings.isEnabled()) {
|
||||
return NetExceptionResponseFactory.error(req, 422, "PAIRING_NOT_AVAILABLE", "Для этого login pairing недоступен");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user