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

Android filename validation when downloading from browser #7

Merged
merged 4 commits into from
Mar 26, 2024

Conversation

jpcloureiro
Copy link

@jpcloureiro jpcloureiro commented Feb 21, 2024

No description provided.

@jpcloureiro
Copy link
Author

jpcloureiro commented Mar 6, 2024

depends on #8

Ready do review after rebase

Copy link

@tommasini tommasini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

chrisleewilcox pushed a commit to MetaMask/metamask-mobile that referenced this pull request Mar 20, 2024
… from browser (#8654)

## **Description**

This change is part of the file react-native-webview+11.13.0.patch, a
collection of patches that we need to apply on top of
react-native-webview.

Original Pull Request:
[#6844](#6844)

Webview changes can be reviewed here:

[MetaMask/react-native-webview-mm#7](MetaMask/react-native-webview-mm#7)

```
Scenario: Download file with invalid file name
  Navigate to websites using browser address bar.
    Given the app displayed the splash animation
    And I have imported my wallet
    And I tap No Thanks on the Enable security check screen
    And I tap No thanks on the onboarding welcome tutorial
    And I navigate to the browser
    And I have 1 browser tab displayed
    When I download a file with invalid filename
    Then an error message should appear
    And the file is not download
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**


https://github.com/MetaMask/metamask-mobile/assets/1649425/aa7d07a8-ab95-4f36-9325-bdcd6760dcd0


### **After**


https://github.com/MetaMask/metamask-mobile/assets/1649425/3e3fd1cf-5593-4afb-8045-4666cad494cd


## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@jpcloureiro
Copy link
Author

QA Passed, Wait on #8 to merge

jpcloureiro added a commit to MetaMask/metamask-mobile that referenced this pull request Mar 20, 2024
… from browser (#8654)

This change is part of the file react-native-webview+11.13.0.patch, a
collection of patches that we need to apply on top of
react-native-webview.

Original Pull Request:
[#6844](#6844)

Webview changes can be reviewed here:

[MetaMask/react-native-webview-mm#7](MetaMask/react-native-webview-mm#7)

```
Scenario: Download file with invalid file name
  Navigate to websites using browser address bar.
    Given the app displayed the splash animation
    And I have imported my wallet
    And I tap No Thanks on the Enable security check screen
    And I tap No thanks on the onboarding welcome tutorial
    And I navigate to the browser
    And I have 1 browser tab displayed
    When I download a file with invalid filename
    Then an error message should appear
    And the file is not download
```

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

https://github.com/MetaMask/metamask-mobile/assets/1649425/aa7d07a8-ab95-4f36-9325-bdcd6760dcd0

https://github.com/MetaMask/metamask-mobile/assets/1649425/3e3fd1cf-5593-4afb-8045-4666cad494cd

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@jpcloureiro jpcloureiro merged commit df10e83 into main Mar 26, 2024
8 checks passed
@leotm leotm deleted the rtlo-protect branch May 29, 2024 12:28
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