Skip to content

Commit

Permalink
patch: (webview upgrade) Android filename validation when downloading…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
jpcloureiro authored Mar 20, 2024
1 parent f2bcf80 commit cc43c9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
"react-native-vector-icons": "6.4.2",
"react-native-video": "5.2.1",
"react-native-view-shot": "^3.1.2",
"react-native-webview": "https://github.com/MetaMask/react-native-webview-mm#9386bb762e8c740b676d31e2ef5c20e34421c36a",
"react-native-webview": "https://github.com/MetaMask/react-native-webview-mm#c9242686e32c876e8028c447c2fe94ad0529968a",
"react-native-webview-invoke": "^0.6.2",
"react-redux": "7.2.4",
"readable-stream": "2.3.7",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24168,9 +24168,9 @@ react-native-webview-invoke@^0.6.2:
resolved "https://registry.yarnpkg.com/react-native-webview-invoke/-/react-native-webview-invoke-0.6.2.tgz#75cc27ef98ea1cbc9386269347d3aafe90d33aa3"
integrity sha512-PCzP7Zl3XwHU10JYS8nR0gwuR8XiOO0MhC8y9ZuPPI+HeISn95GvNYhOXxeLgfbdbUcpNWh1HqxPDySlfCIqxg==

"react-native-webview@https://github.com/MetaMask/react-native-webview-mm#9386bb762e8c740b676d31e2ef5c20e34421c36a":
"react-native-webview@https://github.com/MetaMask/react-native-webview-mm#c9242686e32c876e8028c447c2fe94ad0529968a":
version "13.6.3"
resolved "https://github.com/MetaMask/react-native-webview-mm#9386bb762e8c740b676d31e2ef5c20e34421c36a"
resolved "https://github.com/MetaMask/react-native-webview-mm#c9242686e32c876e8028c447c2fe94ad0529968a"
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
Expand Down

0 comments on commit cc43c9f

Please sign in to comment.