Skip to content

Commit

Permalink
fix following review
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Oct 24, 2022
1 parent 879a237 commit 169c174
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Backup/Encryption] Use `aes-256-gcm` instead of `aes-256-ccm` to mitigate [padding oracle attacks](https://en.wikipedia.org/wiki/Padding_oracle_attack) (PR [#6447](https://github.com/vatesfr/xen-orchestra/pull/6447))
- [Settings/Remote] Display `lock` icon for encrypted remote and a warning if the remote use a legacy encryption algorithm (PR [#6465](https://github.com/vatesfr/xen-orchestra/pull/6465))

### Bug fixes

Expand Down Expand Up @@ -37,6 +38,6 @@
- xo-remote-parser patch
- xo-server minor
- xo-server-transport-nagios patch
- xo-web patch
- xo-web minor

<!--packages-end-->
4 changes: 2 additions & 2 deletions packages/xo-web/src/common/intl/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ const messages = {
remoteEncryptionKey: 'Encrypt all new data sent to this remote',
remoteEncryptionKeyStorageLocation:
"You won't be able to get your data back if you lose the encryption key. The encryption key is saved in the XO config backup, they should be secured correctly. Be careful, if you saved it on an encrypted remote, then you won't be able to access it without the remote encryption key.",
remoteEncryption: 'Encryption',
encryption: 'Encryption',
remoteEncryptionLegacy:
'A legacy encryption algorithm is used ({algorithm}), please create a new remote with the recommanded algorithm {recommendedAlgorithm}',
'A legacy encryption algorithm is used ({algorithm}), please create a new remote with the recommended algorithm {recommendedAlgorithm}',

// ------ New Storage -----

Expand Down
9 changes: 5 additions & 4 deletions packages/xo-web/src/xo-app/settings/remotes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,20 @@ const COLUMN_PROXY = {

const COLUMN_ENCRYPTION = {
itemRenderer: remote => {
// remote is not sync, not a lot of data
// remote.info?.encryption undefined means that remote is not enabled and synced
// we don't have the agorithm used at this step
if (remote.info?.encryption === undefined) {
return remote.encryptionKey !== undefined ? <Icon size='lg' icon='lock' /> : null
} else {
// not encrypted
// remote enabled and not encrypted
if (remote.info.encryption.algorithm === 'none') {
return null
}
const { algorithm, isLegacy, recommendedAlgorithm } = remote.info.encryption
return (
<span>
<Tooltip content={algorithm}>
<Icon icon='lock' size='lg' />
<Icon className='mr-1' icon='lock' size='lg' />
</Tooltip>

{isLegacy && (
Expand All @@ -150,7 +151,7 @@ const COLUMN_ENCRYPTION = {
)
}
},
name: _('remoteEncryption'),
name: _('encryption'),
}

const fixRemoteUrl = remote => editRemote(remote, { url: format(remote) })
Expand Down

0 comments on commit 169c174

Please sign in to comment.