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

[Feature Request]: Permanently delete guest user #505

Closed
brokoler opened this issue Jun 16, 2024 · 1 comment · Fixed by #515
Closed

[Feature Request]: Permanently delete guest user #505

brokoler opened this issue Jun 16, 2024 · 1 comment · Fixed by #515
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@brokoler
Copy link

Scope

GUI

What problem

Airsonic automatically creates a "guest" user, which is shown via "WebUI -> Settings -> Users -> Select User"
After deleting the user it is reappearing automatically after some time.

I see it as an security issue, since I don't know how the guest user is created and which password is assigned to it (Probably some default password that can be bruteforced).

Feature

Guest user should not be created at all and deleting it should be permanent.

@brokoler brokoler added the enhancement New feature or request label Jun 16, 2024
@kagemomiji kagemomiji self-assigned this Jun 16, 2024
@kagemomiji kagemomiji added this to the 11.1.4 milestone Jun 16, 2024
@kagemomiji
Copy link
Owner

@brokoler
guest user is automatically created with random password which length is 30.

public void createGuestUserIfNotExists() {
if (!userRepository.existsById(User.USERNAME_GUEST)) {
User user = new User(User.USERNAME_GUEST, null);
user.setRoles(Set.of(Role.STREAM));
RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange('0', 'z')
.filteredBy(c -> Character.isLetterOrDigit(c))
.get();
createUser(user, generator.generate(30),
"Autogenerated for " + User.USERNAME_GUEST + " user");
}
}

Before 11.1.4-SNAPSHOT.20240613153447, it is created for external player to access resource in Airsonic Advanced.
After that release, it is also created for access artist image. That is why guest user appears frequently.

I don't think there is a high risk of passwords being leaked and causing problems immediately.
But, I agree that automatically generating a guest user and operating in this manner is not ideal. I would like to revise the implementation.

Thank you

kagemomiji added a commit that referenced this issue Jun 24, 2024
…l-without-guest-user

#505 Update artist image URLs with username parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants