Skip to content

Conversation

@rekmarks
Copy link
Member

@rekmarks rekmarks commented Nov 22, 2022

This PR ensures that we only accept http: or https: as the URL protocols for locally hosted snaps. Previously you could provide any protocol accepted by the URL constructor, for example foo:. New test cases are added for snap installs and updates.

@rekmarks rekmarks requested a review from a team as a code owner November 22, 2022 23:17
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2022

Codecov Report

Merging #1005 (be14654) into main (75596e0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1005   +/-   ##
=======================================
  Coverage   92.67%   92.68%           
=======================================
  Files          93       93           
  Lines        9224     9236   +12     
  Branches      894      894           
=======================================
+ Hits         8548     8560   +12     
  Misses        676      676           
Impacted Files Coverage Δ
packages/snaps-utils/src/snaps.ts 98.89% <100.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment on lines +2298 to +2306
const callActionMock = jest
.spyOn(messenger, 'call')
.mockImplementation((method, ..._args: unknown[]) => {
if (method === 'PermissionController:hasPermission') {
return true;
}

return false;
});
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be necessary anymore, since #983 was merged.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants