Fix #798: Allow users with dots in their usernames to request a subsonic password

This commit is contained in:
Eliot Berriot 2019-04-23 11:35:59 +02:00
parent 71b7f416cc
commit b23e87e102
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
3 changed files with 17 additions and 0 deletions

View file

@ -28,6 +28,7 @@ class UserViewSet(mixins.UpdateModelMixin, viewsets.GenericViewSet):
queryset = models.User.objects.all()
serializer_class = serializers.UserWriteSerializer
lookup_field = "username"
lookup_value_regex = r"[a-zA-Z0-9-_.]+"
required_scope = "profile"
@action(methods=["get"], detail=False)