Skip to content

Conversation

@Pogodaanton
Copy link
Contributor

fixes #611

I wouldn't know of a reason why lastfm_api_key_input and lastfm_api_secret_input shouldn't be checked for sameness. As far as I understand, if they are marked as ignore, pasting some larger text won't update the input field's inner data model properly, hence the panic.

@jacksongoode
Copy link
Collaborator

jacksongoode commented Jun 15, 2025

Hmm, I wasn't able to reproduce this issue before but the #[data(ignore)] was intentional because the input of these fields shouldn't be driving any comparison, we shouldn't be saving their content at all until we press the "Connect" button.

I think this is a Druid bug perhaps... and maybe we need to limit the length of this field (which is good anyway given that the API secret and key have well-know lengths).

@Pogodaanton
Copy link
Contributor Author

we shouldn't be saving their content at all until we press the "Connect" button

By saving you mean holding it in memory? I can hardly imagine that the Authentication struct is saved to disk as soon as it is updated. If it is, by that logic, access_token should also be flagged as ignore, no?

@jacksongoode
Copy link
Collaborator

I mean that the partial data saved within the field shouldn't be saved, these fields should only pass data in the attempt to authenticate with Last.fm. I think the solution can simply be to make sure the api and secret are the exact length needed by Last.fm. Would you be willing to make that edit?

@Pogodaanton
Copy link
Contributor Author

I mean that the partial data saved within the field shouldn't be saved, these fields should only pass data in the attempt to authenticate with Last.fm. I think the solution can simply be to make sure the api and secret are the exact length needed by Last.fm. Would you be willing to make that edit?

Hmm, I am unsure how to implement a length limiter for the TextBox in Druid. Can you maybe give me some pointers where I should look and what to consider?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client crashes from last.fm API key input box

2 participants