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

fix: support deno + caching_sha2_password FULL_AUTHENTICATION_PACKET flow #2704

Merged
merged 9 commits into from
May 26, 2024

Conversation

sidorares
Copy link
Owner

Closes #2686

Deno uses default RSA_PKCS1_PADDING for publicEncrypt while in node it's RSA_PKCS1_OAEP_PADDING by default. As a result PERFORM_FULL_AUTHENTICATION_PACKET step returns password encoded differently from what server expects ( note: mysql versions prior to 8.0.5 might expect RSA_PKCS1_PADDING padding, need to validate that and maybe potentially use based on the server? mysql-net/MySqlConnector#489 )

@sidorares sidorares changed the title Support deno + caching_sha2_password FULL_AUTHENTICATION_PACKET flow fix: support deno + caching_sha2_password FULL_AUTHENTICATION_PACKET flow May 25, 2024
Copy link

codecov bot commented May 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.33%. Comparing base (8b5f691) to head (806487b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2704   +/-   ##
=======================================
  Coverage   90.32%   90.33%           
=======================================
  Files          71       71           
  Lines       15727    15730    +3     
  Branches     1340     1340           
=======================================
+ Hits        14206    14209    +3     
  Misses       1521     1521           
Flag Coverage Δ
compression-0 90.33% <100.00%> (+<0.01%) ⬆️
compression-1 90.33% <100.00%> (+<0.01%) ⬆️
tls-0 89.85% <100.00%> (+<0.01%) ⬆️
tls-1 90.13% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@wellwelwel
Copy link
Sponsor Collaborator

wellwelwel commented May 26, 2024

Hey @sidorares, 🙋🏻‍♂️

Just a few things I've been through with Deno

Some common Deno conflicts:

  • When using Node.js native features, they need to be imported as node:module
  • When using process, it needs to be imported first (import process from 'node:process')
  • All extensions need to be explicit (import m from './m.js', import m from './m.ts')

The main challenge is normally handling require and exports in CJS projects/files.

@sidorares sidorares merged commit 2e03694 into master May 26, 2024
72 checks passed
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.

Access Denied after database restart (but granted after login via CLI)
2 participants