Merge tag 'v1.6.12' into develop

tag
This commit is contained in:
Benoit Marty 2024-02-16 11:56:49 +01:00
commit c6d718a555
8 changed files with 41 additions and 6 deletions

View File

@ -1,3 +1,20 @@
Changes in Element v1.6.12 (2024-02-16)
=======================================
This update provides important security fixes, please update now.
Security fixes 🔐
-----------------
- Add a check on incoming intent. ([#1506 internal](https://github.com/matrix-org/internal-config/issues/1506))
- Store temporary files created for Camera in the media folder. ([#1505 internal](https://github.com/matrix-org/internal-config/issues/1505))
Bugfixes 🐛
----------
- Switch the position and styles of the 'already have an account' and 'create account' buttons in the login splash screen. Also changes the 'already have an account one' to just say 'sign in'. ([#+update-login-splash-screen](https://github.com/element-hq/element-android/issues/+update-login-splash-screen))
- Improve `Event.getClearContent()` and fix assignment issue that may help to decrypt last Event in the room list. ([#8744](https://github.com/element-hq/element-android/issues/8744))
- Fix issues about location Event avatar rendering. ([#8749](https://github.com/element-hq/element-android/issues/8749))
Changes in Element v1.6.10 (2024-01-09)
=======================================

View File

@ -1 +0,0 @@
Switch the position and styles of the 'already have an account' and 'create account' buttons in the login splash screen. Also changes the 'already have an account one' to just say 'sign in'.

View File

@ -1 +0,0 @@
Improve `Event.getClearContent()` and fix assignment issue that may help to decrypt last Event in the room list.

View File

@ -1 +0,0 @@
Fix issues about location Event avatar rendering.

View File

@ -0,0 +1,2 @@
Main changes in this version: Security release.
Full changelog: https://github.com/element-hq/element-android/releases

View File

@ -24,7 +24,7 @@ import java.util.Locale
internal fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File {
val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
val storageDir: File = context.filesDir.also { it.mkdirs() }
val storageDir: File = File(context.filesDir, "media").also { it.mkdirs() }
val fileSuffix = when (mediaType) {
MediaType.IMAGE -> ".jpg"
MediaType.VIDEO -> ".mp4"

View File

@ -2,5 +2,5 @@
<paths>
<files-path
name="external_files"
path="." />
path="media" />
</paths>

View File

@ -39,6 +39,9 @@ import im.vector.app.features.analytics.VectorAnalytics
import im.vector.app.features.analytics.plan.ViewRoom
import im.vector.app.features.home.HomeActivity
import im.vector.app.features.home.ShortcutsHandler
import im.vector.app.features.home.room.detail.RoomDetailActivity
import im.vector.app.features.home.room.threads.ThreadsActivity
import im.vector.app.features.location.live.map.LiveLocationMapViewActivity
import im.vector.app.features.notifications.NotificationDrawerManager
import im.vector.app.features.pin.UnlockedActivity
import im.vector.app.features.pin.lockscreen.crypto.LockScreenKeyRepository
@ -115,6 +118,14 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
putExtra(EXTRA_ROOM_ID, roomId)
}
}
val allowList = listOf(
HomeActivity::class.java.name,
MainActivity::class.java.name,
RoomDetailActivity::class.java.name,
ThreadsActivity::class.java.name,
LiveLocationMapViewActivity::class.java.name,
)
}
private val startAppViewModel: StartAppViewModel by viewModel()
@ -186,6 +197,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
// Start the next Activity
startSyncing()
val nextIntent = intent.getParcelableExtraCompat<Intent>(EXTRA_NEXT_INTENT)
?.takeIf { it.isValid() }
startIntentAndFinish(nextIntent)
} else if (intent.hasExtra(EXTRA_INIT_SESSION)) {
startSyncing()
@ -380,4 +392,11 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
intent?.let { startActivity(it) }
finish()
}
private fun Intent.isValid(): Boolean {
val componentName = resolveActivity(packageManager) ?: return false
val packageName = componentName.packageName
val className = componentName.className
return packageName == buildMeta.applicationId && className in allowList
}
}