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

Fix error when reading empty authtoken names from db #30801

Closed
wants to merge 1 commit into from

Conversation

IljaN
Copy link
Member

@IljaN IljaN commented Mar 16, 2018

Issue: #30792

@patrickjahns patrickjahns self-requested a review March 16, 2018 14:20
@patrickjahns
Copy link
Contributor

Not sure if this is the right path to go - we explicitly disallowed empty tokens to be entered in the frontend (which makes sense).

Alternative should rather be to provide a proper migration when upgrading?

@IljaN
Copy link
Member Author

IljaN commented Mar 16, 2018

@patrickjahns Were empty names allowed in the version before?

@DeepDiver1975
Copy link
Member

Title is missleading

@IljaN IljaN changed the title Allow empty authtoken name Fix error when reading empty authtoken names from db Mar 16, 2018
@IljaN
Copy link
Member Author

IljaN commented Mar 16, 2018

@DeepDiver1975 better?

@patrickjahns
Copy link
Contributor

@IljaN
in 10.0.4 it was allowed - with #29831 it was discouraged
Issue fixed by disallowing empty tokens:
#29709

Expected behavior changed to requiring a name for the token with 10.0.5

@IljaN
Copy link
Member Author

IljaN commented Mar 16, 2018

Alternative should rather be to provide a proper migration when upgrading?

@PVince81 I think @patrickjahns has a point, what do you think?

@PVince81
Copy link
Contributor

Ok for a migration so no code workaround needed.

I just found it weird that we validate the token data even after reading from the DB.

@IljaN
Copy link
Member Author

IljaN commented Mar 16, 2018

It`s probably because the DB layer is using same setters when populating objects from db

@IljaN
Copy link
Member Author

IljaN commented Mar 16, 2018

Will create a migration then

@IljaN IljaN closed this Mar 16, 2018
@IljaN IljaN deleted the allow_empty_auth_token_name branch March 16, 2018 14:57
@patrickjahns
Copy link
Contributor

@IljaN
Exactly - that's what made me triage the bug to 'lets just create a string in the db'
https://github.com/owncloud/core/blob/master/lib/public/AppFramework/Db/Entity.php#L67-L70

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants