Skip to content

Check homeserver when login using qr code #4708

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 6 commits into from
May 15, 2025
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented May 12, 2025

Content

Check authorization of server extracted from the QRCode.

Draft as we're waiting for the final design

Motivation and context

Restrict usage of homeserver on Element Pro

Screenshots / GIFs

Tests

  • Tweak the code so that DefaultEnterpriseService.isAllowedToConnectToHomeserver return false
  • Try to login using a QrCode
  • Observe that an error is displayed

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@bmarty bmarty added the PR-Misc For other changes label May 12, 2025
@bmarty bmarty changed the title Feature/bma/qr code check Check homeserver when login using qr code May 12, 2025
Copy link
Contributor

github-actions bot commented May 12, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/ANr6ah

Copy link

codecov bot commented May 12, 2025

Codecov Report

Attention: Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.17%. Comparing base (fe91895) to head (f5c58f4).
Report is 23 commits behind head on develop.

Files with missing lines Patch % Lines
...in/impl/screens/qrcode/scan/QrCodeScanPresenter.kt 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4708      +/-   ##
===========================================
+ Coverage    80.16%   80.17%   +0.01%     
===========================================
  Files         2126     2126              
  Lines        56313    56347      +34     
  Branches      7021     7024       +3     
===========================================
+ Hits         45141    45176      +35     
+ Misses        8761     8759       -2     
- Partials      2411     2412       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmarty bmarty force-pushed the feature/bma/qrCodeCheck branch from f88a199 to 3ee94f1 Compare May 13, 2025 08:22
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label May 13, 2025
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label May 13, 2025
@bmarty bmarty marked this pull request as ready for review May 13, 2025 13:12
@bmarty bmarty requested a review from a team as a code owner May 13, 2025 13:12
@bmarty bmarty requested review from ganfra and removed request for a team May 13, 2025 13:12
Copy link

@bmarty bmarty merged commit f1ca70f into develop May 15, 2025
31 checks passed
@bmarty bmarty deleted the feature/bma/qrCodeCheck branch May 15, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants