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

increased column length for id and secret #711

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

nc-fkl
Copy link
Contributor

@nc-fkl nc-fkl commented Nov 21, 2023

closes #405
Increased column limit to 2048 for client_secret and client_id as there is no specified max length in https://www.rfc-editor.org/rfc/rfc6749

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

Nice!
It would be nice to show the max length in the settings labels and to limit the input fields.

lib/Migration/Version010304Date20231121102449.php Outdated Show resolved Hide resolved
lib/Migration/Version00004Date20200428102743.php Outdated Show resolved Hide resolved
@julien-nc
Copy link
Member

Also, maybe you forgot to sign your commit. To make sure i never forget, I have this alias in my ~/.gitconfig:

[alias]
    co = commit -s

So I always do git co instead of git commit.

Also, check the failing Lint / cs php7.4 CI check. It tells you exactly what to adjust.

@nc-fkl nc-fkl closed this Nov 29, 2023
@nc-fkl nc-fkl reopened this Nov 29, 2023
@julien-nc
Copy link
Member

🏓 😁

@nc-fkl nc-fkl force-pushed the fix/column-length-clientid-and-secret branch from 350bcb9 to 3891179 Compare December 7, 2023 17:34
@nc-fkl nc-fkl requested a review from julien-nc December 7, 2023 17:39
@nc-fkl
Copy link
Contributor Author

nc-fkl commented Dec 8, 2023

🏓 😁

🏓pong

Comment on lines 40 to 46
if ($table->hasColumn('client_secret')) {
$column = $table->getColumn('client_secret');
$column->setLength(2048);
$column = $table->getColumn('client_id');
$column->setLength(2048);
$schemaChanged = true;
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if ($table->hasColumn('client_secret')) {
$column = $table->getColumn('client_secret');
$column->setLength(2048);
$column = $table->getColumn('client_id');
$column->setLength(2048);
$schemaChanged = true;
}
if ($table->hasColumn('client_secret')) {
$column = $table->getColumn('client_secret');
$column->setLength(2048);
$schemaChanged = true;
}
if ($table->hasColumn('client_id')) {
$column = $table->getColumn('client_id');
$column->setLength(2048);
$schemaChanged = true;
}

Also, schemaChanged is not initialized (to false).

Copy link
Member

Choose a reason for hiding this comment

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

schemaChanged is still not initialized 😁

@julien-nc julien-nc self-requested a review December 18, 2023 10:16
@julien-nc julien-nc merged commit 65b75d8 into main Dec 18, 2023
41 checks passed
@julien-nc julien-nc deleted the fix/column-length-clientid-and-secret branch December 18, 2023 10:20
@julien-nc julien-nc mentioned this pull request Jan 29, 2024
Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

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

Successfully merging this pull request may close these issues.

Client ID and Client Secret string limits are too short.
2 participants