Skip to content

Commit

Permalink
Merge branch 'develop' into release/2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tobihagemann committed Jan 16, 2024
2 parents e9e8650 + 400e3d7 commit 2467416
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ public class CryptomatorHubAuthenticator: HubDeviceRegistering, HubKeyReceiving
webAppURL: webAppURL)

let encryptedVaultKey: String
let unlockHeader: [AnyHashable: Any]
switch retrieveMasterkeyResponse {
case let .success(key):
case let .success(key, header):
encryptedVaultKey = key
unlockHeader = header
case .accessNotGranted:
return .accessNotGranted
case .licenseExceeded:
Expand All @@ -93,7 +95,7 @@ public class CryptomatorHubAuthenticator: HubDeviceRegistering, HubKeyReceiving
let encryptedUserKeyJWE = try JWE(compactSerialization: encryptedUserKey)
let encryptedVaultKeyJWE = try JWE(compactSerialization: encryptedVaultKey)

return .success(.init(encryptedUserKey: encryptedUserKeyJWE, encryptedVaultKey: encryptedVaultKeyJWE, header: [:]))
return .success(.init(encryptedUserKey: encryptedUserKeyJWE, encryptedVaultKey: encryptedVaultKeyJWE, header: unlockHeader))
}

/**
Expand Down Expand Up @@ -240,7 +242,7 @@ public class CryptomatorHubAuthenticator: HubDeviceRegistering, HubKeyReceiving
guard let body = String(data: data, encoding: .utf8) else {
throw CryptomatorHubAuthenticatorError.unexpectedResponse
}
return .success(encryptedVaultKey: body)
return .success(encryptedVaultKey: body, header: httpResponse?.allHeaderFields ?? [:])
case 402:
return .licenseExceeded
case 403, 410:
Expand Down Expand Up @@ -299,7 +301,7 @@ public class CryptomatorHubAuthenticator: HubDeviceRegistering, HubKeyReceiving

private enum RetrieveVaultMasterkeyEncryptedForUserResponse {
// 200
case success(encryptedVaultKey: String)
case success(encryptedVaultKey: String, header: [AnyHashable: Any])
// 403, 410
case accessNotGranted
// 402
Expand Down
4 changes: 4 additions & 0 deletions SharedResources/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@
"hubAuthentication.licenseExceeded" = "La tua istanza Cryptomator Hub ha una licenza non valida. Si prega di informare un amministratore Hub per aggiornare o rinnovare la licenza.";
"hubAuthentication.deviceRegistration.deviceName.cells.name" = "Nome Del Dispositivo";
"hubAuthentication.deviceRegistration.deviceName.footer.title" = "Sembra che questo sia il primo accesso alle Centrali delle Casseforti da questo dispositivo. Per poterlo identificare ai fini dell'autorizzazione all'accesso è necessario dare un nome a questo dispositivo.";
"hubAuthentication.deviceRegistration.accountKey.footer.title" = "La chiave del tuo account è richiesta per accedere da nuove applicazioni o browser. Può essere trovata nel tuo profilo.";
"hubAuthentication.deviceRegistration.needsAuthorization.alert.title" = "Registrazione del dispositivo Riuscita";
"hubAuthentication.deviceRegistration.needsAuthorization.alert.message" = "Per accedere al vault, il tuo dispositivo deve essere autorizzato dal proprietario del vault.";
"hubAuthentication.requireAccountInit.alert.title" = "Azione richiesta";
"hubAuthentication.requireAccountInit.alert.message" = "Per procedere, completa i passaggi richiesti nel tuo profilo dell'Hub.";
"hubAuthentication.requireAccountInit.alert.actionButton" = "Vai al profilo";

"intents.saveFile.missingFile" = "Il file fornito non è valido.";
"intents.saveFile.invalidFolder" = "La cartella fornita non è valida.";
Expand Down
4 changes: 4 additions & 0 deletions SharedResources/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@
"hubAuthentication.licenseExceeded" = "Din Cryptomator Hub-instans har en ogiltig licens. Vänligen informera en Hub administratör för att uppgradera eller förnya licensen.";
"hubAuthentication.deviceRegistration.deviceName.cells.name" = "Enhetsnamn";
"hubAuthentication.deviceRegistration.deviceName.footer.title" = "Detta verkar vara den första Hub-åtkomsten från den här enheten. För att identifiera den för åtkomstbehörighet, måste du namnge den här enheten.";
"hubAuthentication.deviceRegistration.accountKey.footer.title" = "Din kontonyckel krävs för att logga in från nya appar eller webbläsare. Den finns i din profil.";
"hubAuthentication.deviceRegistration.needsAuthorization.alert.title" = "Enhetsregistrering lyckades";
"hubAuthentication.deviceRegistration.needsAuthorization.alert.message" = "För att komma åt valvet måste din enhet godkännas av valvägaren.";
"hubAuthentication.requireAccountInit.alert.title" = "Åtgärd krävs";
"hubAuthentication.requireAccountInit.alert.message" = "För att fortsätta, vänligen fyll i de steg som krävs i din Hub-användarprofil.";
"hubAuthentication.requireAccountInit.alert.actionButton" = "Gå till profil";

"intents.saveFile.missingFile" = "Den angivna filen är inte giltig.";
"intents.saveFile.invalidFolder" = "Den angivna mappen är inte giltig.";
Expand Down

0 comments on commit 2467416

Please sign in to comment.