[GH-ISSUE #852] admin:admin cannot be deactivated #4879

Closed
opened 2026-03-01 15:36:57 +03:00 by kerem · 12 comments
Owner

Originally created by @soekdd on GitHub (Feb 6, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/852

Description

The standard-user 'admin' cannot ba deleted (because its an inital user, ok), cannot be modfifed or deactivated (because of demo-mode). But the demo mode is not actived:

app.ini

[node]
Name                 =
SkipInstallation     = false
Demo                 = false
ICPNumber            =
PublicSecurityNumber =

Info:

  • Server OS: Debian GNU/Linux 12 (bookworm)
  • Nginx UI Version: v2.0.0-rc.1
  • Your Browser: Chrome
Originally created by @soekdd on GitHub (Feb 6, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/852 **Description** The standard-user 'admin' cannot ba deleted (because its an inital user, ok), cannot be modfifed or deactivated (because of demo-mode). But the demo mode is not actived: app.ini ``` ini [node] Name = SkipInstallation = false Demo = false ICPNumber = PublicSecurityNumber = ``` **Info:** - Server OS: Debian GNU/Linux 12 (bookworm) - Nginx UI Version: v2.0.0-rc.1 - Your Browser: Chrome
kerem 2026-03-01 15:36:57 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@soekdd commented on GitHub (Feb 6, 2025):

Demo                 = 0

doesnt work either...

<!-- gh-comment-id:2638911101 --> @soekdd commented on GitHub (Feb 6, 2025): ``` Demo = 0 ``` doesnt work either...
Author
Owner

@soekdd commented on GitHub (Feb 6, 2025):

c.ModifyHook(func(c *cosy.Ctx[model.User]) {
		c.BeforeDecodeHook(func(ctx *cosy.Ctx[model.User]) {
			if ctx.ID == 1 {
				ctx.AbortWithError(user.ErrChangeInitUserPwdInDemo)
			}
		})
		c.BeforeDecodeHook(encryptPassword)
	})

Unfortunately I'm not common with go. But it looks like you dont check for demo mode.

<!-- gh-comment-id:2638942959 --> @soekdd commented on GitHub (Feb 6, 2025): ``` c.ModifyHook(func(c *cosy.Ctx[model.User]) { c.BeforeDecodeHook(func(ctx *cosy.Ctx[model.User]) { if ctx.ID == 1 { ctx.AbortWithError(user.ErrChangeInitUserPwdInDemo) } }) c.BeforeDecodeHook(encryptPassword) }) ``` Unfortunately I'm not common with go. But it looks like you dont check for demo mode.
Author
Owner

@0xJacky commented on GitHub (Feb 6, 2025):

Thank you for the report, i will fix it later.

<!-- gh-comment-id:2638956182 --> @0xJacky commented on GitHub (Feb 6, 2025): Thank you for the report, i will fix it later.
Author
Owner

@0xJacky commented on GitHub (Feb 6, 2025):

Fixed in 7049599, please reinstall the latest version of v2.0.0-rc.1.

<!-- gh-comment-id:2639373353 --> @0xJacky commented on GitHub (Feb 6, 2025): Fixed in [7049599](https://github.com/0xJacky/nginx-ui/commit/70495999223c0f437be41aa7d69ace5480342f4d), please reinstall the latest version of v2.0.0-rc.1.
Author
Owner

@soekdd commented on GitHub (Feb 6, 2025):

Great job!

<!-- gh-comment-id:2639446244 --> @soekdd commented on GitHub (Feb 6, 2025): Great job!
Author
Owner

@soekdd commented on GitHub (Feb 6, 2025):

Sorry, I'll have to ask you to open the ticket again:
I have installed your new version: Change password responds with a success message, but it does not change the password. So admin:admin remains active. Changing the passwords of all other users also fails.

BTW: I wish you would not transmit the password (either when logging in or when changing the password) unencrypted.

<!-- gh-comment-id:2639482428 --> @soekdd commented on GitHub (Feb 6, 2025): Sorry, I'll have to ask you to open the ticket again: I have installed your new version: Change password responds with a success message, but it does not change the password. So admin:admin remains active. Changing the passwords of all other users also fails. BTW: I wish you would not transmit the password (either when logging in or when changing the password) unencrypted.
Author
Owner

@0xJacky commented on GitHub (Feb 6, 2025):

Oops, I will fix it again later. By the way, this is the autocomplete function of the browser, and it is not nginx-ui to change the password unencrypted.

<!-- gh-comment-id:2639494743 --> @0xJacky commented on GitHub (Feb 6, 2025): Oops, I will fix it again later. By the way, this is the autocomplete function of the browser, and it is not nginx-ui to change the password unencrypted.
Author
Owner

@soekdd commented on GitHub (Feb 6, 2025):

Nope, the passwords are in plain text in your web service calls:

{
    "name": "soek",
    "password": "0xJacky!sTheB3st",
    "otp": "",
    "recovery_code": ""
}
<!-- gh-comment-id:2639542640 --> @soekdd commented on GitHub (Feb 6, 2025): Nope, the passwords are in plain text in your web service calls: ``` { "name": "soek", "password": "0xJacky!sTheB3st", "otp": "", "recovery_code": "" } ```
Author
Owner

@0xJacky commented on GitHub (Feb 6, 2025):

Currently, it will be encrypted when it's stored to the database, but the request was made without encryption. I will try to enhance this.

<!-- gh-comment-id:2639563983 --> @0xJacky commented on GitHub (Feb 6, 2025): Currently, it will be encrypted when it's stored to the database, but the request was made without encryption. I will try to enhance this.
Author
Owner

@0xJacky commented on GitHub (Feb 6, 2025):

Please reinstall the latest rc.1, the password changing issue has been resolved.

<!-- gh-comment-id:2639869648 --> @0xJacky commented on GitHub (Feb 6, 2025): Please reinstall the latest rc.1, the password changing issue has been resolved.
Author
Owner

@soekdd commented on GitHub (Feb 6, 2025):

Check it, works! Thank you very much for you exemplary response! Greatings from Dresden/Germany.

<!-- gh-comment-id:2639992099 --> @soekdd commented on GitHub (Feb 6, 2025): Check it, works! Thank you very much for you exemplary response! Greatings from Dresden/Germany.
Author
Owner

@0xJacky commented on GitHub (Feb 7, 2025):

Nope, the passwords are in plain text in your web service calls:

{
    "name": "soek",
    "password": "0xJacky!sTheB3st",
    "otp": "",
    "recovery_code": ""
}

Recently, we used the RSA algorithm to encrypt the payload of login/install requests, this change will be released in the next RC version. Thanks for your suggestion!

<!-- gh-comment-id:2643117471 --> @0xJacky commented on GitHub (Feb 7, 2025): > Nope, the passwords are in plain text in your web service calls: > > ``` > { > "name": "soek", > "password": "0xJacky!sTheB3st", > "otp": "", > "recovery_code": "" > } > ``` Recently, we used the RSA algorithm to encrypt the payload of login/install requests, this change will be released in the next RC version. Thanks for your suggestion!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#4879
No description provided.