url = testProps.getProperty("name.www") + ":" + testProps.getProperty("serverPort.https");
String[] parts = testProps.getProperty("mail").split(":", 2);
ter = new TestEmailReciever(new InetSocketAddress(parts[0], Integer.parseInt(parts[1])));
url = testProps.getProperty("name.www") + ":" + testProps.getProperty("serverPort.https");
String[] parts = testProps.getProperty("mail").split(":", 2);
ter = new TestEmailReciever(new InetSocketAddress(parts[0], Integer.parseInt(parts[1])));
byte[] cacerts = Files.readAllBytes(Paths.get("config/cacerts.jks"));
byte[] keystore = Files.readAllBytes(Paths.get("config/keystore.pkcs12"));
byte[] cacerts = Files.readAllBytes(Paths.get("config/cacerts.jks"));
byte[] keystore = Files.readAllBytes(Paths.get("config/keystore.pkcs12"));
- DevelLauncher.writeGigiConfig(toGigi, "changeit".getBytes(), "changeit".getBytes(), mainProps, cacerts, keystore);
+ DevelLauncher.writeGigiConfig(toGigi, "changeit".getBytes("UTF-8"), "changeit".getBytes("UTF-8"), mainProps, cacerts, keystore);
mainProps.setProperty("name.secure", testProps.getProperty("name.secure"));
mainProps.setProperty("name.www", testProps.getProperty("name.www"));
mainProps.setProperty("name.static", testProps.getProperty("name.static"));
mainProps.setProperty("name.secure", testProps.getProperty("name.secure"));
mainProps.setProperty("name.www", testProps.getProperty("name.www"));
mainProps.setProperty("name.static", testProps.getProperty("name.static"));
mainProps.setProperty("https.port", testProps.getProperty("serverPort.https"));
mainProps.setProperty("http.port", testProps.getProperty("serverPort.http"));
mainProps.setProperty("https.port", testProps.getProperty("serverPort.https"));
mainProps.setProperty("http.port", testProps.getProperty("serverPort.http"));
String csrf = getCSRF(csrfConn);
uc.addRequestProperty("Cookie", headerField);
uc.setDoOutput(true);
String csrf = getCSRF(csrfConn);
uc.addRequestProperty("Cookie", headerField);
uc.setDoOutput(true);
registerUser(firstName, lastName, email, password);
try {
TestMail tm = ter.recieve();
registerUser(firstName, lastName, email, password);
try {
TestMail tm = ter.recieve();
public static void grant(String email, Group g) throws IOException {
HttpURLConnection huc = (HttpURLConnection) new URL("https://" + getServerName() + Manager.PATH).openConnection();
huc.setDoOutput(true);
public static void grant(String email, Group g) throws IOException {
HttpURLConnection huc = (HttpURLConnection) new URL("https://" + getServerName() + Manager.PATH).openConnection();
huc.setDoOutput(true);
- huc.getOutputStream().write(("addpriv=y&priv=" + URLEncoder.encode(g.getDatabaseName(), "UTF-8") + "&email=" + URLEncoder.encode(email, "UTF-8")).getBytes());
+ huc.getOutputStream().write(("addpriv=y&priv=" + URLEncoder.encode(g.getDatabaseName(), "UTF-8") + "&email=" + URLEncoder.encode(email, "UTF-8")).getBytes("UTF-8"));
huc.setDoOutput(true);
OutputStream os = huc.getOutputStream();
String data = "username=" + URLEncoder.encode(email, "UTF-8") + "&password=" + URLEncoder.encode(pw, "UTF-8") + "&csrf=" + URLEncoder.encode(csrf, "UTF-8");
huc.setDoOutput(true);
OutputStream os = huc.getOutputStream();
String data = "username=" + URLEncoder.encode(email, "UTF-8") + "&password=" + URLEncoder.encode(pw, "UTF-8") + "&csrf=" + URLEncoder.encode(csrf, "UTF-8");
OutputStream os = uc.getOutputStream();
os.write(("csrf=" + URLEncoder.encode(csrf, "UTF-8") + "&" //
+ query//
OutputStream os = uc.getOutputStream();
os.write(("csrf=" + URLEncoder.encode(csrf, "UTF-8") + "&" //
+ query//
EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld");
adrr.insert(Language.getInstance(Locale.ENGLISH));
TestMail testMail = getMailReciever().recieve();
EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld");
adrr.insert(Language.getInstance(Locale.ENGLISH));
TestMail testMail = getMailReciever().recieve();
assertEquals(adrr.getAddress(), testMail.getTo());
String hash = testMail.extractLink().substring(testMail.extractLink().lastIndexOf('=') + 1);
adrr.verify(hash);
assertEquals(adrr.getAddress(), testMail.getTo());
String hash = testMail.extractLink().substring(testMail.extractLink().lastIndexOf('=') + 1);
adrr.verify(hash);