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(AccountProperty): better validation of twitter and fediverse handles #50678

Merged
merged 5 commits into from
Feb 6, 2025

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Feb 5, 2025

Summary

Make sure that twitter and fediverse handles are in a valid format.

Checklist

@susnux susnux added bug 3. to review Waiting for reviews feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.) labels Feb 5, 2025
@susnux susnux added this to the Nextcloud 32 milestone Feb 5, 2025
@susnux
Copy link
Contributor Author

susnux commented Feb 5, 2025

/backport to stable31

@susnux
Copy link
Contributor Author

susnux commented Feb 5, 2025

/backport to stable30

@susnux
Copy link
Contributor Author

susnux commented Feb 5, 2025

/backport to stable29

@susnux susnux force-pushed the fix/harden-account-properties branch from 2227cff to d8e3ba8 Compare February 5, 2025 23:18
Copy link
Member

@Pytal Pytal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall

}

try {
return URL.parse(`https://${result[2]}/`) !== null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, only knew of the new URL way before 💯

apps/provisioning_api/lib/Controller/UsersController.php Outdated Show resolved Hide resolved
@susnux susnux force-pushed the fix/harden-account-properties branch from d8e3ba8 to 6675740 Compare February 6, 2025 00:35
@susnux susnux force-pushed the fix/harden-account-properties branch from 96573e1 to d7c0626 Compare February 6, 2025 09:10
Ensure to only accept valid X and fediverse handles.

Signed-off-by: Ferdinand Thiessen <[email protected]>
Harden also for existing values of the profile.

Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants