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

MINIMUM_KEY_SIZE_CHECK value wrongly evaluated #28451

Closed
karolyi opened this issue Dec 13, 2023 · 2 comments · Fixed by #28492
Closed

MINIMUM_KEY_SIZE_CHECK value wrongly evaluated #28451

karolyi opened this issue Dec 13, 2023 · 2 comments · Fixed by #28492
Labels
good first issue Likely to be an easy fix type/bug
Milestone

Comments

@karolyi
Copy link

karolyi commented Dec 13, 2023

Description

Hey,

when MINIMUM_KEY_SIZE_CHECK = true in the config (default), the UI settings will say:
image

Which is false. Turning the option off will place a checkmark in place of the 'option disabled' icon.

I think the configuration option is badly evaluated and thus confusing. Or the option description is worded wrongly.

Gitea Version

1.21.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

irrelevant

How are you running Gitea?

In a FreeBSD jail.

Database

MySQL/MariaDB

@karolyi
Copy link
Author

karolyi commented Dec 13, 2023

I thought I understood it wrong, but it seems I still was right.

Setting the option MINIMUM_KEY_SIZE_CHECK = false will result in "Disable Minimum Key Size Check = ✗"
Turning the option MINIMUM_KEY_SIZE_CHECK = true will result in "Disable Minimum Key Size Check = ✔"

Aside from it being worded completely confusing, it's evaluated wrongly too.

@karolyi karolyi reopened this Dec 13, 2023
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Dec 13, 2023

Regression of #13860

The old code has commented out the code.

image

Actually IMO this code block could (should) be removed completely, because there is another code block below:

image

@wxiaoguang wxiaoguang added the good first issue Likely to be an easy fix label Dec 13, 2023
wxiaoguang added a commit that referenced this issue Dec 17, 2023
…ys (#28492)

Resolves #28451.

This change follows the recommendation by wxiaoguang to remove the
"Disable Minimum Key Size Check" from the "Service Configuration"
section of the UI, because this option belongs to the "SSH
Configuration" section of the administration menu and already has a
functioning indicator in that section of the UI.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this issue Jan 17, 2024
…ys (go-gitea#28492)

Resolves go-gitea#28451.

This change follows the recommendation by wxiaoguang to remove the
"Disable Minimum Key Size Check" from the "Service Configuration"
section of the UI, because this option belongs to the "SSH
Configuration" section of the administration menu and already has a
functioning indicator in that section of the UI.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
…ys (go-gitea#28492)

Resolves go-gitea#28451.

This change follows the recommendation by wxiaoguang to remove the
"Disable Minimum Key Size Check" from the "Service Configuration"
section of the UI, because this option belongs to the "SSH
Configuration" section of the administration menu and already has a
functioning indicator in that section of the UI.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang added a commit to wxiaoguang/gitea that referenced this issue Mar 23, 2024
…ys (go-gitea#28492)

Resolves go-gitea#28451.

This change follows the recommendation by wxiaoguang to remove the
"Disable Minimum Key Size Check" from the "Service Configuration"
section of the UI, because this option belongs to the "SSH
Configuration" section of the administration menu and already has a
functioning indicator in that section of the UI.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@lunny lunny added this to the 1.21.10 milestone Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Likely to be an easy fix type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants