Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions 7 server/src/com/cloud/storage/VolumeApiServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,9 @@ public GetUploadParamsResponse doInTransaction(TransactionStatus status) throws

// set the post url, this is used in the monitoring thread to determine the SSVM
VolumeDataStoreVO volumeStore = _volumeStoreDao.findByVolume(vol.getId());
if (volumeStore != null) {
volumeStore.setExtractUrl(url);
_volumeStoreDao.persist(volumeStore);
}
assert (volumeStore != null) : "sincle volume is registered, volumestore cannot be null at this stage";
volumeStore.setExtractUrl(url);
_volumeStoreDao.persist(volumeStore);

response.setId(UUID.fromString(vol.getUuid()));

Expand Down
3 changes: 1 addition & 2 deletions 3 utils/src/com/cloud/utils/EncryptionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package com.cloud.utils;

import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

Expand Down Expand Up @@ -63,7 +62,7 @@ public static String generateSignature(String data, String key) {
final Mac mac = Mac.getInstance("HmacSHA1");
final SecretKeySpec keySpec = new SecretKeySpec(key.getBytes("UTF-8"), "HmacSHA1");
mac.init(keySpec);
mac.update(data.getBytes(Charset.defaultCharset()));
mac.update(data.getBytes("UTF-8"));
final byte[] encryptedBytes = mac.doFinal();
return Base64.encodeBase64String(encryptedBytes);
} catch (NoSuchAlgorithmException | InvalidKeyException | UnsupportedEncodingException e) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.