mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 10:28:12 +01:00
Generate external creds for KBS based on UUID
This commit is contained in:
@@ -285,7 +285,7 @@ public class AccountController {
|
||||
long timeRemaining = TimeUnit.DAYS.toMillis(7) - (System.currentTimeMillis() - existingAccount.get().getLastSeen());
|
||||
Optional<ExternalServiceCredentials> credentials = existingAccount.get().getRegistrationLock().isPresent() &&
|
||||
existingAccount.get().getRegistrationLockSalt().isPresent() ?
|
||||
Optional.of(backupServiceCredentialGenerator.generateFor(number)) :
|
||||
Optional.of(backupServiceCredentialGenerator.generateFor(existingAccount.get().getUuid().toString())) :
|
||||
Optional.empty();
|
||||
|
||||
if (Util.isEmpty(accountAttributes.getPin()) &&
|
||||
|
||||
@@ -26,6 +26,6 @@ public class SecureBackupController {
|
||||
@Path("/auth")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ExternalServiceCredentials getAuth(@Auth Account account) {
|
||||
return backupServiceCredentialGenerator.generateFor(account.getNumber());
|
||||
return backupServiceCredentialGenerator.generateFor(account.getUuid().toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user