Skip to content

Commit c6d718a

Browse files
committed
Merge tag 'v1.6.12' into develop
tag
2 parents 355d091 + effdca1 commit c6d718a

File tree

8 files changed

+41
-6
lines changed

8 files changed

+41
-6
lines changed

CHANGES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
Changes in Element v1.6.12 (2024-02-16)
2+
=======================================
3+
4+
This update provides important security fixes, please update now.
5+
6+
Security fixes 🔐
7+
-----------------
8+
- Add a check on incoming intent. ([#1506 internal](https://github.com/matrix-org/internal-config/issues/1506))
9+
- Store temporary files created for Camera in the media folder. ([#1505 internal](https://github.com/matrix-org/internal-config/issues/1505))
10+
11+
Bugfixes 🐛
12+
----------
13+
- 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))
14+
- 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))
15+
- Fix issues about location Event avatar rendering. ([#8749](https://github.com/element-hq/element-android/issues/8749))
16+
17+
118
Changes in Element v1.6.10 (2024-01-09)
219
=======================================
320

changelog.d/+update-login-splash-screen.bugfix

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/8744.bugfix

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/8749.bugfix

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: Security release.
2+
Full changelog: https://github.com/element-hq/element-android/releases

library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import java.util.Locale
2424

2525
internal fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File {
2626
val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
27-
val storageDir: File = context.filesDir.also { it.mkdirs() }
27+
val storageDir: File = File(context.filesDir, "media").also { it.mkdirs() }
2828
val fileSuffix = when (mediaType) {
2929
MediaType.IMAGE -> ".jpg"
3030
MediaType.VIDEO -> ".mp4"

library/multipicker/src/main/res/xml/multipicker_provider_paths.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
<paths>
33
<files-path
44
name="external_files"
5-
path="." />
6-
</paths>
5+
path="media" />
6+
</paths>

vector/src/main/java/im/vector/app/features/MainActivity.kt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ import im.vector.app.features.analytics.VectorAnalytics
3939
import im.vector.app.features.analytics.plan.ViewRoom
4040
import im.vector.app.features.home.HomeActivity
4141
import im.vector.app.features.home.ShortcutsHandler
42+
import im.vector.app.features.home.room.detail.RoomDetailActivity
43+
import im.vector.app.features.home.room.threads.ThreadsActivity
44+
import im.vector.app.features.location.live.map.LiveLocationMapViewActivity
4245
import im.vector.app.features.notifications.NotificationDrawerManager
4346
import im.vector.app.features.pin.UnlockedActivity
4447
import im.vector.app.features.pin.lockscreen.crypto.LockScreenKeyRepository
@@ -115,6 +118,14 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
115118
putExtra(EXTRA_ROOM_ID, roomId)
116119
}
117120
}
121+
122+
val allowList = listOf(
123+
HomeActivity::class.java.name,
124+
MainActivity::class.java.name,
125+
RoomDetailActivity::class.java.name,
126+
ThreadsActivity::class.java.name,
127+
LiveLocationMapViewActivity::class.java.name,
128+
)
118129
}
119130

120131
private val startAppViewModel: StartAppViewModel by viewModel()
@@ -186,6 +197,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
186197
// Start the next Activity
187198
startSyncing()
188199
val nextIntent = intent.getParcelableExtraCompat<Intent>(EXTRA_NEXT_INTENT)
200+
?.takeIf { it.isValid() }
189201
startIntentAndFinish(nextIntent)
190202
} else if (intent.hasExtra(EXTRA_INIT_SESSION)) {
191203
startSyncing()
@@ -380,4 +392,11 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
380392
intent?.let { startActivity(it) }
381393
finish()
382394
}
395+
396+
private fun Intent.isValid(): Boolean {
397+
val componentName = resolveActivity(packageManager) ?: return false
398+
val packageName = componentName.packageName
399+
val className = componentName.className
400+
return packageName == buildMeta.applicationId && className in allowList
401+
}
383402
}

0 commit comments

Comments
 (0)