Skip to content

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

Merged
yamilmedina merged 5 commits intodevelopfrom
fix/schema-validation-for-attachments
May 7, 2025
Merged

fix: schema validation for attachments (WPB-17546)#4015
yamilmedina merged 5 commits intodevelopfrom
fix/schema-validation-for-attachments

Conversation

@yamilmedina
Copy link
Contributor

@yamilmedina yamilmedina commented May 7, 2025

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 enabled auto-merge May 7, 2025 17:56
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 7, 2025

@codecov
Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 27.27273% with 8 lines in your changes missing coverage. Please review.

Project coverage is 46.01%. Comparing base (6c60483) to head (5ba6f3c).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...ome/conversations/usecase/HandleUriAssetUseCase.kt 42.85% 3 Missing and 1 partial ⚠️
...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 ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4015      +/-   ##
===========================================
- Coverage    46.02%   46.01%   -0.02%     
===========================================
  Files          520      520              
  Lines        18108    18119      +11     
  Branches      3044     3046       +2     
===========================================
+ Hits          8335     8338       +3     
- Misses        8909     8916       +7     
- Partials       864      865       +1     
Files with missing lines Coverage Δ
...rc/main/kotlin/com/wire/android/WireApplication.kt 0.00% <0.00%> (ø)
...c/main/kotlin/com/wire/android/util/FileManager.kt 9.83% <0.00%> (-0.51%) ⬇️
...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 6c60483...5ba6f3c. Read the comment docs.

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

@yamilmedina yamilmedina added this pull request to the merge queue May 7, 2025
Merged via the queue into develop with commit 5e69d2f May 7, 2025
12 of 13 checks passed
@yamilmedina yamilmedina deleted the fix/schema-validation-for-attachments branch May 7, 2025 23:58
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

Built wire-android-dev-debug-pr-4015.apk is available for download

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants