mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Possible bug? #3830
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#3830
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @merlin3of5 on GitHub (Dec 13, 2024).
📑 I have found these related issues/pull requests
None that I know for certain are related.
🛡️ Security Policy
Description
The web gui was rejecting my login even after resetting my password. I went searching though open issues trying to find a solution but only found old closed cases with no solution. The problem I was having is that the username is case sensitive and my username was stored in my password manager without the matching uppercase characters. I am not certain if this counts as a "bug" but thought I would post for anyone else having a similar issue.
👟 Reproduction steps
Create a new login and use capitalization in the username. Then try logging in with all lowercase in the username.
👀 Expected behavior
Normally, I would expect the username field to not be case sensitive.
😓 Actual Behavior
Username field is case sensitive.
🐻 Uptime-Kuma Version
1.23.15
💻 Operating System and Arch
Docker
🌐 Browser
Firefox 133.0.3
🖥️ Deployment Environment
📝 Relevant log output
No response
@CommanderStorm commented on GitHub (Dec 14, 2024):
If the username does not match exactly, you should not be allowed to log in.
That being said, the following seems like a good choice too.
@louislam what do you think:
Would the downgrade in security be acceptable?
@homelab-alpha commented on GitHub (Dec 14, 2024):
@CommanderStorm, @louislam, Although it is not standard to make usernames case-sensitive, there are some arguments for situations where it might be necessary. Below are the arguments elaborated:
Uniqueness and Differentiation
JohnDoeandjohndoeas separate accounts. This can be useful in systems where usernames represent specific identities or contexts, such as technical platforms or databases.Adminandadminrepresent two different roles or permissions. Here, case sensitivity is a functional requirement.Technical Consistency with Other Systems
Additional Complexity Against Brute-Force Attacks
johndoe, attackers would need to try combinations such asJohnDoe,JOHNdoe, etc. This can slightly slow down brute-force attacks.Consistency with Passwords
Specific Security Requirements
Conclusion
While case sensitivity reduces user-friendliness, it can be useful or necessary in very specific cases. This is particularly true when technical or security objectives require username complexity, or when the system relies heavily on uniqueness and differentiation between usernames. However, in most standard environments, the drawbacks outweigh the benefits.
@Ionys320 commented on GitHub (Dec 14, 2024):
That's the point, and in fact, the main issue for me. Some PRs prepare UK for external auth providers (LDAP for example with #4751). Therefore, we can't affirm all of the solutions have canse sensitive disabled.
For example, I just tried to connect to my LemonLDAP instance, binded to my LDAP. It appears my username is case-sensitive, and I can create another user with uppercases. Therefore, UK needs (at my point) to keep the username case-sensitive.
BUT something we can do is setting the username to lowercase on the registration/setup process, and when others users are created from UK (#3571), since lowercase is mainly used elsewhere.
@homelab-alpha commented on GitHub (Dec 15, 2024):
@Ionys320, Although I stated in my conclusion, "However, in most standard environments, the drawbacks outweigh the benefits," I believe this does not apply to Uptime Kuma. Uptime Kuma uses
2FA(Two-Factor Authentication), and it is considered best practice for usernames to be case-sensitive for2FAimplementations in general.As a personal note, I support some user inconvenience if it leads to better security. I hope that @louislam agrees with this approach and keeps the username case-sensitive.
@louislam commented on GitHub (Dec 15, 2024):
Yes, I think we should keep the current implementation, simply because I don't want to create any unexpected breaking change, for example, if someone has already created
Adminandadminin the SQLite database, it might run into problems.But I remember there were some people said that, their saved passwords were not working, it may be because of this.
@homelab-alpha commented on GitHub (Dec 15, 2024):
@louislam, Can you provide more context about this? So far, from what I've seen and understood, the passwords are not stored as plaintext but hashed? Or am I mistaken?
@Ionys320 commented on GitHub (Dec 15, 2024):
I guess the main issue is password manager can set the username to lowercase. That's why I suggested this:
@homelab-alpha commented on GitHub (Dec 15, 2024):
@Ionys320, I don't know of any password manager that defaults to converting usernames to lowercase. If this happens, it seems to be a user error in the settings of the password manager.
If this is not the case, I recommend switching to another password manager, such as Bitwarden.