Skip to content

[BUG] PreAuthKeys request mistake? #194

@cheetah747

Description

@cheetah747
  • Browser Version: Windows Google Chrome 130.0.6723.70(Official Build)64bit
  • Headscale Version: 0.24.0,0.25.0 (both same problem)

hello,I think I have found a problem during click the delete button of PreAuthKey expire.

  1. I set user name by "temp", I create a PreAuthKey by cli in my docker,then I can see it in headscale-ui webpage.
    now I click the button besides the PreAuthKey ,just like the sceenshot below ,browser give me response 500. And pop up "user mismatch",here we can see the request json, the user's value is "2".

Image

2.but then ,I change my user's name to "2", then do the same like above, this time I expired the key successfully! just like below

Image

we can see that all the requests post "user:2" but not "user:temp", but only when my name match the "2", it successed. Creating new PreAuthKey also has this problem. I guess the logic of heascale is to match the user name like "temp" but not the user id, isn't that?


I also tested by "curl -X POST" with username "2" and "temp",and the result is the same as above.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions