Files
juli ac77df8a60 Security and robustness fixes from the code review
- Export no longer crashes the server on an unreadable photo (skips it)
- Login limits per username as well as per client; X-Forwarded-For only
  trusted from local/private proxies; constant-time unknown-user path
- Share links: internal fields always removed; values (incl. research
  notes) and notes/locations per link; filters, sort, search and CSV
  cannot reveal hidden fields; questions and stats details hidden
- Password reset/change signs other browsers out
- Comparables keep only http(s) links; CSV cells cannot start a formula
- Phone sign-in redirect stays on this site; browser security headers
- Items belong to accounts (not display names); unique display names
- Uploads go to disk, retried uploads are stored once (app 1.4.1)
- Daily database snapshots, expired-token cleanup, non-root container
2026-11-12 20:13:48 +01:00

77 lines
2.7 KiB
Kotlin

import java.util.Properties
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}
// Release signing comes from android/keystore.properties (not committed). Without it the
// release build falls back to the debug key so `assembleRelease` always works.
val keystoreProps = Properties().apply {
val f = rootProject.file("keystore.properties")
if (f.exists()) f.inputStream().use { load(it) }
}
android {
namespace = "online.bossers.indexipro"
compileSdk = 35
defaultConfig {
applicationId = "online.bossers.indexipro"
minSdk = 26
targetSdk = 35
versionCode = 6
versionName = "1.4.1"
}
signingConfigs {
if (keystoreProps.isNotEmpty()) {
create("release") {
storeFile = rootProject.file(keystoreProps.getProperty("storeFile"))
storePassword = keystoreProps.getProperty("storePassword")
keyAlias = keystoreProps.getProperty("keyAlias")
keyPassword = keystoreProps.getProperty("keyPassword")
}
}
}
buildFeatures {
compose = true
buildConfig = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions { jvmTarget = "17" }
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.findByName("release") ?: signingConfigs.getByName("debug")
}
}
}
dependencies {
val composeBom = platform("androidx.compose:compose-bom:2024.10.01")
implementation(composeBom)
implementation("androidx.activity:activity-compose:1.9.3")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended:1.7.5")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
implementation("io.coil-kt:coil-compose:2.7.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("androidx.work:work-runtime-ktx:2.9.1")
implementation("androidx.exifinterface:exifinterface:1.3.7")
implementation("com.journeyapps:zxing-android-embedded:4.3.0")
implementation("com.google.zxing:core:3.5.3")
}