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

fixes deprecated & vulnerable phin dependency version #12

Closed

Conversation

DevonAM
Copy link

@DevonAM DevonAM commented Apr 24, 2024

What kind of change does this PR introduce? (check at least one)

  • [x ] Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Code style update
  • Refactor (refactoring or adding test which isn't a fix or add a feature)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build-related changes
  • [x ] Other, please describe:

" Updated the phin dependency to a non-deprecated, non-vulnerable version and updated the usage.

Does this PR introduce a breaking change? (check one)

  • Yes
  • [x ] No

Did you test your solution?

  • [ x] I lightly tested it in one browser
  • I deeply tested it in several browsers
  • I wrote tests around it (unit tests, integration tests, E2E tests)

The original test.js passed all tests.

Problem Description

The dependency [email protected] is deprecated and is marked as a vulnerability.

Solution Description

Updated phin to a non-deprecated version, 3.7.1.
The phin function no longer accepts a callback function, it returns an object of type Promise<http.serverResponse>, updated the call to await this function call and only pass in opt. The result is passed into a refactored version of handleData.

Side Effects, Risks, Impact

  • N/A

Additional comments:
Fixes #11

@DevonAM DevonAM changed the title fix deprecated phin dependency fixes #11 deprecated phin dependency Apr 25, 2024
@DevonAM DevonAM changed the title fixes #11 deprecated phin dependency fixes deprecated phin dependency Apr 25, 2024
@DevonAM DevonAM changed the title fixes deprecated phin dependency fixes deprecated & vulnerable phin dependency version Apr 25, 2024
@theneva
Copy link

theneva commented Jun 24, 2024

This seems to hit quite a few people depending on jimp, and I'd love for this to land… @mattdesl are you still(?) in charge of this project? 😄

@mattdesl
Copy link
Collaborator

Unfortunately, it looks like I've been removed from all Experience-Monks repositories, so I'd have to fork this repo and re-publish a patch (I still hold the npm package).

@theneva
Copy link

theneva commented Jun 28, 2024

Ergh, I'm sorry 😅 sounds pretty straightforward though, are you up for it?

@njam3
Copy link
Member

njam3 commented Jul 4, 2024

@mattdesl I've added you to the repo if you are up to continue maintaining it

@mattdesl mattdesl closed this Jul 9, 2024
@mattdesl
Copy link
Collaborator

mattdesl commented Jul 9, 2024

This should be fixed now in the latest commit and npm publish, let me know if that works. I've tweaked your PR slightly to stick with error handling and a callback-style approach (function continues to return void), and added a server test.

Ideally this module should be repurposed to get rid of XHR/server/request features altogether, which would reduce its surface area for attacks and such, but I'm not sure how that would break dependants who might want/expect this feature to exist after so long.

@emericcolombe
Copy link

Thanks a lot for the awesome work @mattdesl ! 🥳 nice to have snyk finally say that it detected no vulnerabilities !

(Btw I saw that there is no tag on the github repo for 1.4.2)

@mattdesl
Copy link
Collaborator

mattdesl commented Jul 9, 2024

Tag pushed!

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.

phin should be upgraded or removed
5 participants