mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-24 05:08:04 +01:00
Write registration recovery passwords exclusively by PNI
This commit is contained in:
committed by
Jon Chambers
parent
8be43566a4
commit
2803c2acdb
@@ -786,7 +786,7 @@ class AccountControllerTest {
|
||||
.withRecoveryPassword(recoveryPassword)))) {
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(204);
|
||||
verify(registrationRecoveryPasswordsManager).storeForCurrentNumber(eq(AuthHelper.UNDISCOVERABLE_NUMBER), eq(recoveryPassword));
|
||||
verify(registrationRecoveryPasswordsManager).store(AuthHelper.UNDISCOVERABLE_PNI, recoveryPassword);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -582,7 +582,7 @@ class VerificationControllerTest {
|
||||
assertTrue(verificationSessionResponse.verified());
|
||||
assertTrue(verificationSessionResponse.requestedInformation().isEmpty());
|
||||
|
||||
verify(registrationRecoveryPasswordsManager).removeForNumber(registrationServiceSession.number());
|
||||
verify(registrationRecoveryPasswordsManager).remove(PNI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -879,7 +879,7 @@ class VerificationControllerTest {
|
||||
try (Response response = request.get()) {
|
||||
assertEquals(HttpStatus.SC_OK, response.getStatus());
|
||||
|
||||
verify(registrationRecoveryPasswordsManager).removeForNumber(registrationServiceSession.number());
|
||||
verify(registrationRecoveryPasswordsManager).remove(PNI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1204,7 +1204,7 @@ class VerificationControllerTest {
|
||||
VerificationSessionResponse.class);
|
||||
assertTrue(verificationSessionResponse.verified());
|
||||
|
||||
verify(registrationRecoveryPasswordsManager).removeForNumber(registrationServiceSession.number());
|
||||
verify(registrationRecoveryPasswordsManager).remove(PNI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1336,7 +1336,7 @@ class VerificationControllerTest {
|
||||
|
||||
assertTrue(verificationSessionResponse.verified());
|
||||
|
||||
verify(registrationRecoveryPasswordsManager).removeForNumber(verifiedSession.number());
|
||||
verify(registrationRecoveryPasswordsManager).remove(PNI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user