Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations update from Weblate #8628

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
28da02c
Fixes #7758: Fixed JWT token for Jitsi openidtoken-jwt authentication
tomtit Apr 18, 2023
c01c995
Translated using Weblate (Estonian)
Aug 23, 2023
21a4032
Merge branch 'origin/develop' into Weblate.
weblate Aug 23, 2023
effcb19
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
b93933d
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
c9ab51e
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
dd17ac0
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
428ebac
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
e0ae3b6
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
9abc6b1
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
eec9b28
Translated using Weblate (Chinese (Simplified))
Aug 24, 2023
10fdf5c
Translated using Weblate (Chinese (Simplified))
Aug 25, 2023
c0a3510
Translated using Weblate (Italian)
Aug 25, 2023
751bd27
Bump org.matrix.rustcomponents:crypto-android from 0.3.10 to 0.3.14
dependabot[bot] Aug 25, 2023
b205144
Translated using Weblate (Portuguese (Brazil))
Aug 26, 2023
b2996f8
Translated using Weblate (Portuguese (Brazil))
Aug 26, 2023
a3be028
Merge pull request #8341 from tomtit/bugfix/issue-7758
bmarty Aug 28, 2023
28f0622
Merge branch 'origin/develop' into Weblate.
weblate Aug 28, 2023
0838a10
Bump memory allocated for tests
jmartinesp Aug 28, 2023
dc8230e
Ignore `LocaleFolder` lint error since we won't fix it.
jmartinesp Aug 28, 2023
d65459c
Try bumping the whole memory heap size in rust tests
jmartinesp Aug 28, 2023
fe51ee3
Try bumping heap size of gradle and the kotlin daemon as a last resort
jmartinesp Aug 28, 2023
1f41c54
Merge pull request #8630 from vector-im/dependabot/gradle/org.matrix.…
jmartinesp Aug 29, 2023
246ad11
Merge branch 'origin/develop' into Weblate.
weblate Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

# Enrich gradle.properties for CI/CD
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx5g -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx3g" -Dkotlin.incremental=false
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 4 --no-daemon

jobs:
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ ext.initScreenshotTests = { project ->
}
}

tasks.withType(Test) {
maxHeapSize = "2g"
}

// Workaround to have KSP generated Kotlin code available in the IDE (for code completion)
// Ref: https://github.com/airbnb/epoxy/releases/tag/5.0.0beta02
subprojects { project ->
Expand Down
1 change: 1 addition & 0 deletions changelog.d/7758.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed JWT token for Jitsi openidtoken-jwt authentication
2 changes: 2 additions & 0 deletions fastlane/metadata/android/et/changelogs/40106030.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: Element Android kasutab nüüd Crypto Rust SDK krüptoteeki.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases
2 changes: 2 additions & 0 deletions fastlane/metadata/android/et/changelogs/40106050.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: kiire veaparandus.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases
2 changes: 2 additions & 0 deletions fastlane/metadata/android/it-IT/changelogs/40106030.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Modifiche principali in questa versione: Element Android ora utilizza l'SDK Rust Crypto.
Cronologia completa: https://github.com/vector-im/element-android/releases
2 changes: 2 additions & 0 deletions fastlane/metadata/android/it-IT/changelogs/40106050.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Modifiche principali in questa versione: correzioni di errori.
Cronologia completa: https://github.com/vector-im/element-android/releases
14 changes: 7 additions & 7 deletions library/ui-strings/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@
<string name="settings_push_rules">Regras de Push</string>
<string name="settings_push_rules_no_rules">Nenhuma regra de push definida</string>
<string name="settings_push_gateway_no_pushers">Nenhum gateway de push registrado</string>
<string name="push_gateway_item_app_id">ID do App:</string>
<string name="push_gateway_item_app_id">App ID:</string>
<string name="push_gateway_item_push_key">Chave Push:</string>
<string name="push_gateway_item_app_display_name">Nome de Exibição do App:</string>
<string name="push_gateway_item_device_name">Nome de Exibição da Sessão:</string>
Expand Down Expand Up @@ -1044,18 +1044,18 @@
<string name="creating_direct_room">Criando sala…</string>
<string name="message_view_edit_history">Visualizar Histórico de Edição</string>
<string name="terms_of_service">Termos de Serviço</string>
<string name="terms_description_for_identity_server">Ser descobertável por outras(os)</string>
<string name="terms_description_for_identity_server">Se tornar achável a outras pessoas</string>
<string name="terms_description_for_integration_manager">Usar bots, bridges, widgets e pacotes de stickers</string>
<string name="identity_server">Servidor de identidade</string>
<string name="disconnect_identity_server">Desconectar servidor de identidade</string>
<string name="add_identity_server">Configurar servidor de identidade</string>
<string name="change_identity_server">Mudar servidor de identidade</string>
<string name="settings_discovery_identity_server_info">Você está atualmente usando %1$s para descobrir e ser descobertável por contatos existentes que você conhece.</string>
<string name="settings_discovery_identity_server_info_none">Você não está atualmente usando um servidor de identidade. Para descobrir e ser descobertável por contatos existentes que você conhece, configure um abaixo.</string>
<string name="settings_discovery_identity_server_info">Você está atualmente usando %1$s para descobrir e ser descoberto por contatos.</string>
<string name="settings_discovery_identity_server_info_none">Você não está atualmente usando um servidor de identidade. Para descobrir e ser descoberto por contatos conhecidos, configure um abaixo.</string>
<string name="settings_discovery_emails_title">Endereços de email descobertáveis</string>
<string name="settings_discovery_no_mails">Opções de descoberta vão aparecer uma vez que você tenha adicionado um endereço de email.</string>
<string name="settings_discovery_no_msisdn">Opções de descoberta vão aparecer uma vez que você tenha adicionado um número de telefone.</string>
<string name="settings_discovery_disconnect_identity_server_info">Desconectar-se de seu servidor de identidade vai significar que você não vai ser descobertável por outras(os) usuárias(os) e você não vai ser capaz de convidar outras(os) por email ou telefone.</string>
<string name="settings_discovery_disconnect_identity_server_info">Ao se desconectar do servidor de identidade, você não poderá ser descoberto por outros usuários e não poderá convidar outras pessoas por e-mail ou telefone.</string>
<string name="settings_discovery_msisdn_title">Números de telefone descobertáveis</string>
<string name="settings_discovery_confirm_mail">Nós enviamos um email para %s, cheque seu email e clique no link de confirmação</string>
<string name="settings_discovery_confirm_mail_not_clicked">Nós enviamos um email para %s, por favor primeiro cheque seu email e clique no link de confirmação</string>
Expand All @@ -1067,7 +1067,7 @@
<string name="settings_text_message_sent">Uma mensagem de texto tem sido enviada para %s. Por favor entre o código de verificação que ela contém.</string>
<string name="settings_text_message_sent_wrong_code">O código de verificação não está correto.</string>
<string name="settings_discovery_disconnect_with_bound_pid">Você está atualmente compartilhando endereços de email ou números de telefone no servidor de identidade %1$s. Você vai precisar reconectar-se a %2$s para parar de os compartilhar.</string>
<string name="settings_agree_to_terms">Concorde com os Termos de Serviço do servidor de identidade (%s) para permitir você mesma(o) ser descobertável por endereço de email ou número de telefone.</string>
<string name="settings_agree_to_terms">Concorde com os Termos de Serviço do servidor de identidade (%s) para permitir que você seja descoberto por email ou pelo número do celular.</string>
<string name="labs_allow_extended_logging">Habilitar verbose logs.</string>
<string name="labs_allow_extended_logging_summary">Verbose logs vão ajudar desenvolvedoras(es) ao prover mais logs quando você enviar uma RageShake. Mesmo quando habilitado, o aplicativo não registra conteúdos de mensagem ou quaisquer outros dados privados.</string>
<string name="error_terms_not_accepted">Por favor retente uma vez que você tenha aceitado os termos e condições de seu servidorcasa.</string>
Expand Down Expand Up @@ -2193,7 +2193,7 @@
<string name="finish_setup">Terminar configuração</string>
<string name="discovery_invite">Convidar por email, encontrar contatos e mais…</string>
<string name="finish_setting_up_discovery">Termine de configurar descoberta.</string>
<string name="create_space_identity_server_info_none">Você não está atualmente usando um servidor de identidade. A fim de convidar colegas e ser descobertável por elas(es), configure um abaixo.</string>
<string name="create_space_identity_server_info_none">Você não está atualmente usando um servidor de identidade. Para que você possa convidar seus amigos e ser descoberto por eles, configure um abaixo.</string>
<string name="invite_by_username_or_mail">Convidar por nome de usuária(o) ou mail</string>
<string name="create_spaces_invite_public_header_desc">Assegure que as pessoas certas têm acesso a companhia %s. Você pode convidar outras mais tarde.</string>
<string name="create_spaces_invite_public_header">Quem são suas/seus colegas\?</string>
Expand Down
28 changes: 19 additions & 9 deletions library/ui-strings/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
<string name="settings_troubleshoot_test_battery_title">电池优化</string>
<string name="settings_inline_url_preview_summary">当家服务器支持此功能时,在聊天中预览链接。</string>
<string name="settings_send_typing_notifs">发送正在输入通知</string>
<string name="settings_send_typing_notifs_summary">让房间中的其他用户知道你正在输入。</string>
<string name="settings_send_typing_notifs_summary">让其他用户知道你正在输入。</string>
<string name="settings_send_markdown">Markdown 格式化</string>
<string name="settings_send_markdown_summary">在消息发出之前使用 Markdown 语法格式化消息。这允许你使用高级的文字格式,例如使用星号显示斜体文字。</string>
<string name="settings_show_read_receipts">显示已读回执</string>
Expand Down Expand Up @@ -1176,9 +1176,9 @@
<string name="signed_out_title">你已登出</string>
<string name="signed_out_notice">这可能由于多种原因:
\n
\n• 你已在其它会话中更改了你的密码
\n• 你已在另一个会话中更改了你的密码
\n
\n• 你已从其它会话删除了此会话
\n• 你已从另一个会话删除了此会话
\n
\n• 你的服务器管理员出于安全原因已取消你的访问权限。</string>
<string name="signed_out_submit">重新登录</string>
Expand Down Expand Up @@ -1321,7 +1321,7 @@
<string name="verification_profile_warning">警告</string>
<string name="room_member_profile_failed_to_get_devices">无法获取会话</string>
<string name="room_member_profile_sessions_section_title">会话</string>
<string name="trusted">可信任</string>
<string name="trusted">已信任</string>
<string name="not_trusted">未信任</string>
<string name="verification_profile_device_verified_because">可信任此会话用于安全地收发消息,因为%1$s(%2$s)已验证了它:</string>
<string name="verification_profile_device_new_signing">%1$s (%2$s) 使用新会话登录:</string>
Expand Down Expand Up @@ -1495,7 +1495,7 @@
<string name="identity_server_error_no_current_binding_error">当前与此标识符没有关联。</string>
<string name="identity_server_set_default_notice">你的家服务器(%1$s)建议使用 %2$s 作为你的身份服务器</string>
<string name="identity_server_set_default_submit">使用 %1$s</string>
<string name="identity_server_set_alternative_notice">或者,你可以输入任何其它身份服务器网址</string>
<string name="identity_server_set_alternative_notice">或者,你可以输入任何其他身份服务器URL</string>
<string name="identity_server_set_alternative_notice_no_default">输入身份服务器 URL</string>
<string name="identity_server_set_alternative_submit">提交</string>
<string name="power_level_edit_title">设置角色</string>
Expand Down Expand Up @@ -1551,7 +1551,7 @@
<string name="auth_pin_new_pin_action">新 PIN</string>
<string name="auth_pin_reset_content">为重置你的 PIN,你将需要重新登录并创建新的。</string>
<string name="settings_security_pin_code_title">启用 PIN</string>
<string name="settings_security_pin_code_summary">如果你想要重置你的 PIN,点按忘记 PIN 登出并重置。</string>
<string name="settings_security_pin_code_summary">如果你想要重置你的PIN,点按“忘记PIN”以登出并重置。</string>
<string name="settings_call_show_confirmation_dialog_title">防止意外通话</string>
<string name="settings_call_show_confirmation_dialog_summary">在开始通话之前要求确认</string>
<string name="no_permissions_to_start_conf_call">你没有权限在此房间发起会议通话</string>
Expand Down Expand Up @@ -1605,7 +1605,7 @@
<string name="universal_link_malformed">链接格式不正确</string>
<string name="settings_security_pin_code_grace_period_summary_off">每次打开 ${app_name} 时都需要 PIN 码。</string>
<string name="settings_security_pin_code_grace_period_summary_on">未使用 ${app_name} 2 分钟后需要 PIN 码。</string>
<string name="settings_security_pin_code_grace_period_title">2 分钟后需要 PIN 码</string>
<string name="settings_security_pin_code_grace_period_title">2分钟后需要PIN</string>
<string name="settings_security_pin_code_notifications_summary_off">仅在一个简单的通知中显示未读消息的数量。</string>
<string name="settings_security_pin_code_notifications_summary_on">显示详情,如房间名称和消息内容。</string>
<string name="settings_security_pin_code_notifications_title">在通知中显示内容</string>
Expand Down Expand Up @@ -2515,7 +2515,7 @@
<string name="thread_list_modal_my_threads_title">我的消息列</string>
<string name="room_unsupported_e2e_algorithm_as_admin">加密被错误地配置了,所以你无法发送消息。点击以打开设置。</string>
<string name="room_unsupported_e2e_algorithm">加密被错误地配置了,所以你无法发送消息。请联系管理员将加密还原到有效的状态。</string>
<string name="room_notification_more_than_two_users_are_typing">%1$s、%2$s 与其他人</string>
<string name="room_notification_more_than_two_users_are_typing">%1$s、%2$s与其他人</string>
<string name="room_notification_two_users_are_typing">%1$s与%2$s</string>
<string name="call_start_screen_sharing">共享屏幕</string>
<string name="call_stop_screen_sharing">停止共享屏幕</string>
Expand Down Expand Up @@ -2823,7 +2823,7 @@
<string name="settings_access_token_summary">你的访问令牌提供对你账户的完全访问权限。勿与任何人分享它。</string>
<string name="settings_access_token">访问令牌</string>
<string name="action_proceed_to_reset">继续重设</string>
<string name="notice_display_name_changed_to">%1$s更改了其显示名称为%2$s</string>
<string name="notice_display_name_changed_to">%1$s将其显示名称改为%2$s</string>
<string name="settings_external_account_management_title">账户</string>
<string name="action_stop">是的,停止</string>
<string name="sign_out_failed_dialog_message">无法连接家服务器。若仍登出,此设备将不会从设备列表擦除,你或许想用另一个客户端移除它。</string>
Expand Down Expand Up @@ -2865,4 +2865,14 @@
<string name="room_polls_wait_for_display">显示投票</string>
<string name="rich_text_editor_quote">切换引用</string>
<string name="rich_text_editor_numbered_list">切换有序列表</string>
<string name="verification_request_was_sent">已发送验证请求。打开一个你的其他会话以接受并开始验证。</string>
<string name="verification_not_found">未找到验证请求。它可能已取消,或由另一个会话处理了。</string>
<string name="direct_room_encryption_enabled_waiting_users_tile_description">受邀用户一旦加入${app_name},你们就能聊天,并且房间会端到端加密</string>
<string name="secure_backup_reset_all_no_other_devices_long">重置你的验证密钥是无法撤销的。重置后,你将无法存取旧的加密消息,并且之前任何验证过你的朋友都会看到安全警告,直到你与他们重新验证。</string>
<string name="room_polls_active_no_item">此房间无正在进行的投票</string>
<string name="confirm_your_identity_after_update">最新更新改进了安全消息传递。 请重新验证你的设备。</string>
<string name="error_voice_broadcast_no_connection_recording">连接错误——录音已暂停</string>
<string name="secure_backup_reset_danger_warning">仅当你确定已丢失所有其他设备和安全密钥时,才请继续。</string>
<string name="encrypted_by_deleted">由已删除的设备加密</string>
<string name="error_voice_broadcast_unable_to_decrypt">无法解密此语音广播。</string>
</resources>
2 changes: 1 addition & 1 deletion matrix-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ dependencies {

implementation libs.google.phonenumber

rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.10")
rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.14")
// rustCryptoApi project(":library:rustCrypto")

testImplementation libs.tests.junit
Expand Down
2 changes: 1 addition & 1 deletion tools/lint/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<issue id="IconDuplicatesConfig" severity="error" />
<issue id="IconDuplicates" severity="error" />
<issue id="IconExpectedSize" severity="error" />
<issue id="LocaleFolder" severity="error" />
<issue id="LocaleFolder" severity="ignore" />

<!-- AlwaysShowAction is considered as an error to force ignoring the issue when detected -->
<issue id="AlwaysShowAction" severity="error" />
Expand Down
1 change: 1 addition & 0 deletions vector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ dependencies {
runtimeOnly(libs.jsonwebtoken.jjwtOrgjson) {
exclude group: 'org.json', module: 'json' //provided by Android natively
}
testImplementation(libs.jsonwebtoken.jjwtOrgjson)
implementation 'commons-codec:commons-codec:1.15'

// MapTiler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ package im.vector.app.features.call.conference.jwt
import im.vector.app.core.utils.ensureProtocol
import io.jsonwebtoken.Jwts
import io.jsonwebtoken.SignatureAlgorithm
import io.jsonwebtoken.io.Encoders
import io.jsonwebtoken.security.Keys
import org.matrix.android.sdk.api.session.openid.OpenIdToken
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import javax.inject.Inject

class JitsiJWTFactory @Inject constructor() {
Expand All @@ -37,7 +40,12 @@ class JitsiJWTFactory @Inject constructor() {
userDisplayName: String
): String {
// The secret key here is irrelevant, we're only using the JWT to transport data to Prosody in the Jitsi stack.
val key = Keys.secretKeyFor(SignatureAlgorithm.HS256)
// In the PR https://github.com/jitsi/luajwtjitsi/pull/3 the function `luajwtjitsi.decode` was removed and
// we cannot use random secret keys anymore. But the JWT library `jjwt` doesn't accept the hardcoded key `notused`
// from the module `prosody-mod-auth-matrix-user-verification` since it's too short and thus insecure. So, we
// create a new token using a random key and then re-sign the token manually with the 'weak' key.
val signatureAlgorithm = SignatureAlgorithm.HS256
val key = Keys.secretKeyFor(signatureAlgorithm)
val context = mapOf(
"matrix" to mapOf(
"token" to openIdToken.accessToken,
Expand All @@ -52,7 +60,8 @@ class JitsiJWTFactory @Inject constructor() {
// As per Jitsi token auth, `iss` needs to be set to something agreed between
// JWT generating side and Prosody config. Since we have no configuration for
// the widgets, we can't set one anywhere. Using the Jitsi domain here probably makes sense.
return Jwts.builder()
val token = Jwts.builder()
.setHeaderParam("typ", "JWT")
.setIssuer(jitsiServerDomain)
.setSubject(jitsiServerDomain)
.setAudience(jitsiServerDomain.ensureProtocol())
Expand All @@ -61,5 +70,11 @@ class JitsiJWTFactory @Inject constructor() {
.claim("context", context)
.signWith(key)
.compact()
// Re-sign token with the hardcoded key
val toSign = token.substring(0, token.lastIndexOf('.'))
val mac = Mac.getInstance(signatureAlgorithm.jcaName)
mac.init(SecretKeySpec("notused".toByteArray(), mac.algorithm))
val prosodySignature = Encoders.BASE64URL.encode(mac.doFinal(toSign.toByteArray()))
return "$toSign.$prosodySignature"
}
}
Loading
Loading