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

Unhandled exception if user/by_username ist passed a pipe (|) #339

Closed
following5 opened this Issue Jul 31, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@following5
Contributor

following5 commented Jul 31, 2015

When services/users/by_username is called with a username parameter containing a pipe char (|), OKAPI will thrown an unhandled exception. Instead, it should report an invalid username error. I will fix this.

@wrygiel

This comment has been minimized.

Member

wrygiel commented Jul 31, 2015

Thanks! I've seen this error before, but never got to fixing it... (I think I should also try to "ban" this character in OCPL usernames, fortunatelly there are not so many of such usernames...)

@following5

This comment has been minimized.

Contributor

following5 commented Jul 31, 2015

Are you sure that there are such usernames in OCPL database? The current OCPL code does not allow them:

clicompatbase.php, line 47:
define('regex_username', '^[a-zA-Z0-9ęóąśłżźćńĘÓĄŚŁŻŹĆŃăîşţâĂÎŞŢÂșțȘȚéáöőüűóúÉÁÖŐÜŰÓÚ@-][a-zA-ZęóąśłżźćńĘÓĄŚŁŻŹĆŃăîşţâĂÎŞŢÂșțȘȚéáöőüűóúÉÁÖŐÜŰÓÚ0-9.-=_ @ęóąśłżźćńĘÓĄŚŁŻŹĆŃăîşţâĂÎŞŢÂșțȘȚéáöőüűóúÉÁÖŐÜŰÓÚäüöÄÜÖ=)(/\ -=&*+~#]{2,59}$');

@wrygiel

This comment has been minimized.

Member

wrygiel commented Jul 31, 2015

You're right. There are none. ;)

On Fri, Jul 31, 2015 at 10:05 PM, following5 notifications@github.com
wrote:

Are you sure that there are such usernames in OCPL database? The current
OCPL code does not allow them:

clicompatbase.php, line 47:
define('regex_username',
'^[a-zA-Z0-9ęóąśłżźćńĘÓĄŚŁŻŹĆŃăîşţâĂÎŞŢÂșțȘȚéáöőüűóúÉÁÖŐÜŰÓÚ@-][a-zA-ZęóąśłżźćńĘÓĄŚŁŻŹĆŃăîşţâĂÎŞŢÂșțȘȚéáöőüűóúÉÁÖŐÜŰÓÚ0-9.-=_
@ęóąśłżźćńĘÓĄŚŁŻŹĆŃăîşţâĂÎŞŢÂșțȘȚéáöőüűóúÉÁÖŐÜŰÓÚäüöÄÜÖ=)(/
-=&*+~#]{2,59}$');


Reply to this email directly or view it on GitHub
#339 (comment).

I took an IQ test and the results were negative.
http://rygielski.net/

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