Skip to content

fix: schema validation for attachments - rc (WPB-17546) #4016

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

Merged
merged 4 commits into from
May 12, 2025

Conversation

yamilmedina
Copy link
Contributor

@yamilmedina yamilmedina commented May 8, 2025

Cherry-pick of:


BugWPB-17546 [Android] Sanitize schema for sharing assets


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Extra handling needed for the app about sharing attachments, to be more restrict about what can be shared or not

Solutions

Deny the usage of file:// schema. We don't need it in the app, we use as supposed to content resolvers for it.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@yamilmedina yamilmedina self-assigned this May 8, 2025
@yamilmedina yamilmedina changed the title fix: schema validation for attachments (WPB-17546) (rc) fix: schema validation for attachments - rc (WPB-17546) May 8, 2025
Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 45.92%. Comparing base (994d5ac) to head (d99d9d7).
Report is 3 commits behind head on release/candidate.

Files with missing lines Patch % Lines
...ome/conversations/usecase/HandleUriAssetUseCase.kt 42.85% 3 Missing and 1 partial ⚠️
...essagecomposer/recordaudio/RecordAudioViewModel.kt 0.00% 3 Missing ⚠️
...c/main/kotlin/com/wire/android/util/FileManager.kt 0.00% 3 Missing ⚠️
...rc/main/kotlin/com/wire/android/WireApplication.kt 0.00% 1 Missing ⚠️
.../src/main/kotlin/com/wire/android/util/FileUtil.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/candidate    #4016   +/-   ##
==================================================
  Coverage              45.91%   45.92%           
==================================================
  Files                    492      492           
  Lines                  17174    17192   +18     
  Branches                2862     2864    +2     
==================================================
+ Hits                    7886     7895    +9     
- Misses                  8491     8499    +8     
- Partials                 797      798    +1     
Files with missing lines Coverage Δ
...rc/main/kotlin/com/wire/android/WireApplication.kt 0.00% <0.00%> (ø)
.../src/main/kotlin/com/wire/android/util/FileUtil.kt 18.58% <0.00%> (-0.09%) ⬇️
...essagecomposer/recordaudio/RecordAudioViewModel.kt 65.28% <0.00%> (ø)
...c/main/kotlin/com/wire/android/util/FileManager.kt 10.16% <0.00%> (-0.55%) ⬇️
...ome/conversations/usecase/HandleUriAssetUseCase.kt 87.50% <42.85%> (-9.47%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1feaf9f...d99d9d7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

github-actions bot commented May 8, 2025

Built wire-android-staging-compat-pr-4016.apk is available for download

@yamilmedina yamilmedina enabled auto-merge May 8, 2025 12:27
@yamilmedina yamilmedina added this pull request to the merge queue May 12, 2025
@yamilmedina yamilmedina removed this pull request from the merge queue due to a manual request May 12, 2025
@yamilmedina yamilmedina enabled auto-merge May 12, 2025 14:35
Copy link

@yamilmedina yamilmedina added this pull request to the merge queue May 12, 2025
Merged via the queue into release/candidate with commit b430485 May 12, 2025
13 of 15 checks passed
@yamilmedina yamilmedina deleted the fix/schema-vald-cherrypick-rc branch May 12, 2025 14:58
Copy link
Contributor

Built wire-android-staging-compat-pr-4016.apk is available for download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants