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

Pinned project validation fails when getting user preferences #694

Open
olevski opened this issue Mar 3, 2025 · 1 comment
Open

Pinned project validation fails when getting user preferences #694

olevski opened this issue Mar 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@olevski
Copy link
Member

olevski commented Mar 3, 2025

String should match pattern '^[a-zA-Z0-9]([_.\-/]?[a-zA-Z0-9]+)*[a-zA-Z0-9]$' [type=string_pattern_mismatch, input_value='bethcg/renku-teaching-assignment-1', input_type=str]

From: https://sentry.dev.renku.ch/organizations/sentry/issues/9428/events/0862a32f453d47aca14b89161788112b/

The code where this happens is:

/app/env/lib/python3.12/site-packages/renku_data_services/users/blueprints.py in _get at line 245

        @authenticate(self.authenticator)
        async def _get(_: Request, user: base_models.APIUser) -> JSONResponse:
            user_preferences: models.UserPreferences
            user_preferences = await self.user_preferences_repo.get_user_preferences(requested_by=user)
            return validated_json(apispec.UserPreferences, user_preferences)
@olevski olevski changed the title Pinned project validation fails on Pinned project validation fails when getting user preferences Mar 3, 2025
@olevski olevski added the bug Something isn't working label Mar 3, 2025
@olevski
Copy link
Member Author

olevski commented Mar 3, 2025

Regex tester at https://regex101.com/ says:

Catastrophic backtracking has been detected and the execution of your expression has been halted.

And running this code locally produces the same error as posted above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant