delete account without e-mail and text

This commit is contained in:
kroko 2024-04-24 15:51:00 +02:00
parent 2d757b925f
commit e8a93acee3
7 changed files with 41 additions and 41 deletions

View File

@ -7,11 +7,11 @@
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\Ar4i\.android\avd\Pixel_5_API_34.avd" />
<value value="C:\Users\49176\.android\avd\Pixel_5_API_30.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-09-01T16:36:10.445111300Z" />
<timeTargetWasSelectedWithDropDown value="2024-02-08T11:34:39.856735300Z" />
</component>
</project>

View File

@ -24,6 +24,9 @@
<entry key="..\:/AndroidStudio/Befund/Android/app/src/main/res/layout/popup_privacy_policy.xml" value="0.259375" />
<entry key="..\:/AndroidStudio/Befund/Android/app/src/main/res/layout/popup_push_explain.xml" value="0.2" />
<entry key="..\:/AndroidStudio/Befund/Android/app/src/main/res/layout/results_table_row.xml" value="0.259375" />
<entry key="..\:/AndroidStudio/patbef/app/src/main/res/layout/activity_edit_oegd.xml" value="0.3723958333333333" />
<entry key="..\:/AndroidStudio/patbef/app/src/main/res/layout/activity_faq.xml" value="0.259375" />
<entry key="..\:/AndroidStudio/patbef/app/src/main/res/layout/activity_support.xml" value="0.3723958333333333" />
<entry key="..\:/git/Befund/Android/app/src/main/res/drawable-v24/ic_launcher.xml" value="0.4296875" />
<entry key="..\:/git/Befund/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.19895833333333332" />
<entry key="..\:/git/Befund/Android/app/src/main/res/drawable/bottom_border.xml" value="0.4453125" />

View File

@ -2,6 +2,5 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Android" vcs="Git" />
</component>
</project>

View File

@ -35,7 +35,7 @@ import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import de.labor_stein.befund.BuildConfig;
//import de.labor_stein.befund.BuildConfig;
import de.labor_stein.befund.Core.Lang.Lang;
import de.labor_stein.befund.Core.Log;
import de.labor_stein.befund.Core.Models.Request.EncryptedRequest;
@ -46,6 +46,10 @@ import de.labor_stein.befund.Core.Models.Session;
import de.labor_stein.befund.Core.Security.AES;
import de.labor_stein.befund.Core.Security.Curve25519;
class BuildConfig
{
public static boolean DEBUG = true;
}
public class Request
{
/**

View File

@ -10,7 +10,7 @@ package de.labor_stein.befund.Core.Https;
public enum Servers
{
// Development server change ip to your local ip
DEVELOPMENT("192.168.10.26"),
DEVELOPMENT("patientenbefundapp.labor-muenster.de"),
//DEVELOPMENT("172.21.200.145"),
/**

View File

@ -127,31 +127,21 @@ public class EncryptedResponse
*/
public boolean ValidSignature(byte[] deriveKey, String serverSignature, String serverSignatureKey)
{
String content;
if ( this.encrypted_content != null && !this.encrypted_content.isEmpty())
{
return
// Validate over HMAC
(this.hmac != null && !this.hmac.isEmpty() &&
content = this.encrypted_content;
}
else {
content = this.descriptor;
}
return (this.hmac != null && !this.hmac.isEmpty() &&
deriveKey != null &&
deriveKey.length > 0 &&
SHA512.isValidAuthenticationCode(hmac, this.encrypted_content, deriveKey)) &&
//Validate over Ed25519
(serverSignature != null && !serverSignature.isEmpty() &&
Ed25519.CheckValid(Base64.FromBase64String(serverSignature), this.encrypted_content.getBytes(StandardCharsets.UTF_8), Base64.FromBase64String(serverSignatureKey)));
}
else
{
return
// Validate over HMAC
(this.hmac != null && !this.hmac.isEmpty() &&
deriveKey != null &&
deriveKey.length > 0 &&
SHA512.isValidAuthenticationCode(hmac, this.descriptor, deriveKey)) &&
//Validate over Ed25519
SHA512.isValidAuthenticationCode(hmac, content, deriveKey)) &&
(serverSignature != null && !serverSignature.isEmpty() &&
Ed25519.CheckValid(Base64.FromBase64String(serverSignature), this.descriptor.getBytes(StandardCharsets.UTF_8), Base64.FromBase64String(serverSignatureKey)));
}
//Validate over Ed25519
Ed25519.CheckValid(Base64.FromBase64String(serverSignature), content.getBytes(StandardCharsets.UTF_8), Base64.FromBase64String(serverSignatureKey)));
}
}

View File

@ -548,14 +548,24 @@ public class SupportActivity extends AppCompatActivity
SupportActivity_Loading.setVisibility(View.GONE);
if(SupportActivity_Topics.getSelectedItemPosition() < 0)
{
this.SupportActivity_HideLoading(Lang.Get("ERROR_ENTER_TOPIC"));
}
else
{
int topicIndex = (int)SupportActivity_Topics.getSelectedItemId();
String topic = Topics[topicIndex];
if(topic == Lang.Get("LBL_SUPPORT_TOPIC_ACCOUNT_DELETE"))
{
PopupPasswordConfirm_Show();
}
else
{
if(SupportActivity_txtEmail.getText() == null || SupportActivity_txtEmail.getText().toString().isEmpty())
{
this.SupportActivity_HideLoading(Lang.Get("ERROR_ENTER_EMAIL"));
}
else if(SupportActivity_Topics.getSelectedItemPosition() < 0)
{
this.SupportActivity_HideLoading(Lang.Get("ERROR_ENTER_TOPIC"));
}
else if(SupportActivity_txtTEXT.getText() == null || SupportActivity_txtTEXT.getText().toString().isEmpty())
{
this.SupportActivity_HideLoading(Lang.Get("ERROR_ENTER_TEXT"));
@ -563,18 +573,12 @@ public class SupportActivity extends AppCompatActivity
else
{
String email = SupportActivity_txtEmail.getText().toString();
int topicIndex = (int)SupportActivity_Topics.getSelectedItemId();
String topic = Topics[topicIndex];
String text = SupportActivity_txtTEXT.getText().toString();
if(topic == Lang.Get("LBL_SUPPORT_TOPIC_ACCOUNT_DELETE"))
{
PopupPasswordConfirm_Show();
}
else
{
this.SendAsync(email, topic, text, false);
}
}
}
}
catch (Exception ex)