| Chunk |
|---|
| Conflicting content |
|---|
}
return clientHostAddress + ":" + clientHostPort;
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
<<<<<<< HEAD
package com.cloud.servlet;
// To maintain independency of console proxy project, we duplicate this class from console proxy project
public class ConsoleProxyClientParam {
private String clientHostAddress;
private int clientHostPort;
private String clientHostPassword;
private String clientTag;
private String ticket;
private String clientTunnelUrl;
private String clientTunnelSession;
private String ajaxSessionId;
public ConsoleProxyClientParam() {
clientHostPort = 0;
}
public String getClientHostAddress() {
return clientHostAddress;
}
public void setClientHostAddress(String clientHostAddress) {
this.clientHostAddress = clientHostAddress;
}
public int getClientHostPort() {
return clientHostPort;
}
public void setClientHostPort(int clientHostPort) {
this.clientHostPort = clientHostPort;
}
public String getClientHostPassword() {
return clientHostPassword;
}
public void setClientHostPassword(String clientHostPassword) {
this.clientHostPassword = clientHostPassword;
}
public String getClientTag() {
return clientTag;
}
public void setClientTag(String clientTag) {
this.clientTag = clientTag;
}
public String getTicket() {
return ticket;
}
public void setTicket(String ticket) {
this.ticket = ticket;
}
public String getClientTunnelUrl() {
return clientTunnelUrl;
}
}
return ticket;
public void setClientTunnelUrl(String clientTunnelUrl) {
this.clientTunnelUrl = clientTunnelUrl;
}
public String getClientTunnelSession() {
return clientTunnelSession;
}
public void setClientTunnelSession(String clientTunnelSession) {
this.clientTunnelSession = clientTunnelSession;
}
public String getAjaxSessionId() {
return this.ajaxSessionId;
}
public void setAjaxSessionId(String ajaxSessionId) {
this.ajaxSessionId = ajaxSessionId;
}
public String getClientMapKey() {
if(clientTag != null && !clientTag.isEmpty())
return clientTag;
return clientHostAddress + ":" + clientHostPort;
}
}
=======
package com.cloud.servlet;
// To maintain independency of console proxy project, we duplicate this class from console proxy project
public class ConsoleProxyClientParam {
private String clientHostAddress;
private int clientHostPort;
private String clientHostPassword;
private String clientTag;
private String ticket;
private String clientTunnelUrl;
private String clientTunnelSession;
private String ajaxSessionId;
public ConsoleProxyClientParam() {
clientHostPort = 0;
}
public String getClientHostAddress() {
return clientHostAddress;
}
public void setClientHostAddress(String clientHostAddress) {
this.clientHostAddress = clientHostAddress;
}
public int getClientHostPort() {
return clientHostPort;
}
public void setClientHostPort(int clientHostPort) {
this.clientHostPort = clientHostPort;
}
public String getClientHostPassword() {
return clientHostPassword;
}
public void setClientHostPassword(String clientHostPassword) {
this.clientHostPassword = clientHostPassword;
}
public String getClientTag() {
return clientTag;
}
public void setClientTag(String clientTag) {
this.clientTag = clientTag;
}
public String getTicket() {
}
public void setTicket(String ticket) {
this.ticket = ticket;
}
public String getClientTunnelUrl() {
return clientTunnelUrl;
}
public void setClientTunnelUrl(String clientTunnelUrl) {
this.clientTunnelUrl = clientTunnelUrl;
}
public String getClientTunnelSession() {
return clientTunnelSession;
}
public void setClientTunnelSession(String clientTunnelSession) {
this.clientTunnelSession = clientTunnelSession;
}
public String getAjaxSessionId() {
return this.ajaxSessionId;
}
public void setAjaxSessionId(String ajaxSessionId) {
this.ajaxSessionId = ajaxSessionId;
}
public String getClientMapKey() {
if(clientTag != null && !clientTag.isEmpty())
return clientTag;
>>>>>>> f157b702e4c6821fc4af4c27e085dea097b79101 |
| Solution content |
|---|
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.servlet;
// To maintain independency of console proxy project, we duplicate this class from console proxy project
public class ConsoleProxyClientParam {
private String clientHostAddress;
private int clientHostPort;
private String clientHostPassword;
private String clientTag;
private String ticket;
private String clientTunnelUrl;
private String clientTunnelSession;
private String ajaxSessionId;
public ConsoleProxyClientParam() {
clientHostPort = 0;
}
public String getClientHostAddress() {
return clientHostAddress;
}
public void setClientHostAddress(String clientHostAddress) {
this.clientHostAddress = clientHostAddress;
}
public int getClientHostPort() {
return clientHostPort;
}
public void setClientHostPort(int clientHostPort) {
this.clientHostPort = clientHostPort;
}
public String getClientHostPassword() {
return clientHostPassword;
}
public void setClientHostPassword(String clientHostPassword) {
this.clientHostPassword = clientHostPassword;
}
public String getClientTag() {
return clientTag;
}
public void setClientTag(String clientTag) {
this.clientTag = clientTag;
}
public String getTicket() {
return ticket;
}
public void setTicket(String ticket) {
this.ticket = ticket;
}
public String getClientTunnelUrl() {
return clientTunnelUrl;
}
public void setClientTunnelUrl(String clientTunnelUrl) {
this.clientTunnelUrl = clientTunnelUrl;
}
public String getClientTunnelSession() {
return clientTunnelSession;
}
public void setClientTunnelSession(String clientTunnelSession) {
this.clientTunnelSession = clientTunnelSession;
}
public String getAjaxSessionId() {
return this.ajaxSessionId;
}
public void setAjaxSessionId(String ajaxSessionId) {
this.ajaxSessionId = ajaxSessionId;
}
public String getClientMapKey() {
if(clientTag != null && !clientTag.isEmpty())
return clientTag;
return clientHostAddress + ":" + clientHostPort;
}
} |
| File |
|---|
| ConsoleProxyClientParam.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Class declaration |
| Comment |
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
<<<<<<< HEAD
package com.cloud.servlet;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
// To maintain independency of console proxy project, we duplicate this class from console proxy project
public class ConsoleProxyPasswordBasedEncryptor {
private static final Logger s_logger = Logger.getLogger(ConsoleProxyPasswordBasedEncryptor.class);
private String password;
private Gson gson;
public ConsoleProxyPasswordBasedEncryptor(String password) {
this.password = password;
gson = new GsonBuilder().create();
}
public String encryptText(String text) {
if(text == null || text.isEmpty())
return text;
assert(password != null);
assert(!password.isEmpty());
try {
Cipher cipher = Cipher.getInstance("DES");
int maxKeySize = 8;
SecretKeySpec keySpec = new SecretKeySpec(normalizeKey(password.getBytes(), maxKeySize), "DES");
cipher.init(Cipher.ENCRYPT_MODE, keySpec);
byte[] encryptedBytes = cipher.doFinal(text.getBytes());
return Base64.encodeBase64URLSafeString(encryptedBytes);
} catch (NoSuchAlgorithmException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (NoSuchPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (IllegalBlockSizeException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (BadPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (InvalidKeyException e) {
s_logger.error("Unexpected exception ", e);
return null;
}
}
public String decryptText(String encryptedText) {
if(encryptedText == null || encryptedText.isEmpty())
return encryptedText;
assert(password != null);
assert(!password.isEmpty());
try {
Cipher cipher = Cipher.getInstance("DES");
int maxKeySize = 8;
SecretKeySpec keySpec = new SecretKeySpec(normalizeKey(password.getBytes(), maxKeySize), "DES");
cipher.init(Cipher.DECRYPT_MODE, keySpec);
byte[] encryptedBytes = Base64.decodeBase64(encryptedText);
return new String(cipher.doFinal(encryptedBytes));
} catch (NoSuchAlgorithmException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (NoSuchPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (IllegalBlockSizeException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (BadPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (InvalidKeyException e) {
s_logger.error("Unexpected exception ", e);
return null;
}
}
public |
| Solution content |
|---|
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.servlet;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
// To maintain independency of console proxy project, we duplicate this class from console proxy project
public class ConsoleProxyPasswordBasedEncryptor {
private static final Logger s_logger = Logger.getLogger(ConsoleProxyPasswordBasedEncryptor.class);
private String password;
private Gson gson;
public ConsoleProxyPasswordBasedEncryptor(String password) {
this.password = password;
gson = new GsonBuilder().create();
}
public String encryptText(String text) {
if(text == null || text.isEmpty())
return text;
assert(password != null);
assert(!password.isEmpty());
try {
Cipher cipher = Cipher.getInstance("DES");
int maxKeySize = 8;
SecretKeySpec keySpec = new SecretKeySpec(normalizeKey(password.getBytes(), maxKeySize), "DES");
cipher.init(Cipher.ENCRYPT_MODE, keySpec);
byte[] encryptedBytes = cipher.doFinal(text.getBytes());
return Base64.encodeBase64URLSafeString(encryptedBytes);
} catch (NoSuchAlgorithmException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (NoSuchPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (IllegalBlockSizeException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (BadPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (InvalidKeyException e) {
s_logger.error("Unexpected exception ", e);
return null;
}
}
public String decryptText(String encryptedText) {
if(encryptedText == null || encryptedText.isEmpty())
return encryptedText;
assert(password != null);
assert(!password.isEmpty());
try {
Cipher cipher = Cipher.getInstance("DES");
int maxKeySize = 8;
SecretKeySpec keySpec = new SecretKeySpec(normalizeKey(password.getBytes(), maxKeySize), "DES");
cipher.init(Cipher.DECRYPT_MODE, keySpec);
byte[] encryptedBytes = Base64.decodeBase64(encryptedText);
return new String(cipher.doFinal(encryptedBytes));
} catch (NoSuchAlgorithmException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (NoSuchPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (IllegalBlockSizeException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (BadPaddingException e) {
s_logger.error("Unexpected exception ", e);
return null;
} catch (InvalidKeyException e) {
s_logger.error("Unexpected exception ", e);
return null;
}
}
public |
| File |
|---|
| ConsoleProxyPasswordBasedEncryptor.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Class declaration |
| Comment |
| Import |
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
// KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. <<<<<<< HEAD package com.cloud.servlet; ======= package com.cloud.servlet; >>>>>>> f157b702e4c6821fc4af4c27e085dea097b79101 import java.io.IOException; import java.net.URLEncoder; import java.util.ArrayList; |
| Solution content |
|---|
// KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package com.cloud.servlet; import java.io.IOException; import java.net.URLEncoder; import java.util.ArrayList; |
| File |
|---|
| ConsoleProxyServlet.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
// KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. <<<<<<< HEAD package com.cloud.storage.dao; import java.util.List; import com.cloud.host.HostVO; import com.cloud.storage.VolumeHostVO; import com.cloud.utils.db.GenericDao; public interface VolumeHostDao extends GenericDao |
| Solution content |
|---|
// KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package com.cloud.storage.dao; import java.util.List; import com.cloud.host.HostVO; import com.cloud.storage.VolumeHostVO; import com.cloud.utils.db.GenericDao; public interface VolumeHostDao extends GenericDao |
| File |
|---|
| VolumeHostDao.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Interface declaration |
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
import javax.ejb.Local;
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
<<<<<<< HEAD
package com.cloud.storage.dao;
import java.util.List;
import com.cloud.host.HostVO;
import com.cloud.storage.VMTemplateHostVO;
import com.cloud.storage.VolumeHostVO;
import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
@Local(value={VolumeHostDao.class})
public class VolumeHostDaoImpl extends GenericDaoBase |
| Solution content |
|---|
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.storage.dao;
import java.util.List;
import javax.ejb.Local;
import com.cloud.host.HostVO;
import com.cloud.storage.VMTemplateHostVO;
import com.cloud.storage.VolumeHostVO;
import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
@Local(value={VolumeHostDao.class})
public class VolumeHostDaoImpl extends GenericDaoBase |
| File |
|---|
| VolumeHostDaoImpl.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Annotation |
| Class declaration |
| Import |
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
// KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. <<<<<<< HEAD package com.cloud.uuididentity.dao; ======= package com.cloud.uuididentity.dao; >>>>>>> f157b702e4c6821fc4af4c27e085dea097b79101 import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; |
| Solution content |
|---|
// KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package com.cloud.uuididentity.dao; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; |
| File |
|---|
| IdentityDaoImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Package declaration |