Added port#135
Closed
Revadike wants to merge 6 commits into
Closed
Conversation
Contributor
Author
|
(In case you were wondering, I picked port 32019, because it is the start month of this project ;) ) |
levz0r
requested changes
Dec 4, 2025
Owner
levz0r
left a comment
There was a problem hiding this comment.
Review
Good feature - port 80 requires root privileges on Unix and blocks many users. Changing default to 32019 is a sensible choice.
Bugs Found 🐛
1. Assignment instead of argument passing (3 occurrences)
// gmail-tester.js:192 - BUG
return await _get_recent_email(credentials, token, options, port = 32019);
// ^^^^^^^^^^^^
// Should be just: port
// gmail-tester.js:209 - BUG
const oAuth2Client = await gmail.authorize(credentials, token, port = 32019);
// Should be just: port
// gmail.js:31 - BUG
const newOAuth2Client = await get_new_token(oAuth2Client, token, port = 32019);
// Should be just: portThese are assignments (port = 32019), not parameter passing. This always passes 32019 regardless of what port value was passed in, breaking the feature.
2. Inconsistent defaults
oauth2.jsdefaults toport = 80- All other files default to
port = 32019
Should be consistent (32019 everywhere).
Suggested Fix
// gmail-tester.js:192
- return await _get_recent_email(credentials, token, options, port = 32019);
+ return await _get_recent_email(credentials, token, options, port);
// gmail-tester.js:209
- const oAuth2Client = await gmail.authorize(credentials, token, port = 32019);
+ const oAuth2Client = await gmail.authorize(credentials, token, port);
// gmail.js:31
- const newOAuth2Client = await get_new_token(oAuth2Client, token, port = 32019);
+ const newOAuth2Client = await get_new_token(oAuth2Client, token, port);
// libs/oauth2.js:35
- async function authenticate(oauth2Client, scopes, tokensFile, port = 80) {
+ async function authenticate(oauth2Client, scopes, tokensFile, port = 32019) {Once these are fixed, this PR is good to merge! 👍
This was referenced Dec 4, 2025
Owner
|
Thank you for the contribution! This PR has been superseded by #149 which includes your changes along with bug fixes, tests, and documentation updates. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port 80 is often used by other (essential) processes, making the current form of the library unusable for some people. This PR will make it configurable.