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
Can not create user with non-ascii (multi-byte) characters in it's name [CORE4760] #5063
Comments
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff Works for me: # ./isql employee ./isql -user "кузьмин" -pas 123 localhost:employee USERКУЗЬМИН SQL> Is locale info correct on your box? |
Commented by: @AlexPeshkoff Works for me: # ./isql -user "кузьмин" -pas 123 localhost:employee USERКУЗЬМИН SQL> Is locale info correct on your box? (when non-ascii text is typed in command line it should match, not connection charset). |
Commented by: @pavel-zotov Sorry, my firebird.conf contained Legacy_UserManager. But after changing it to default value and restart Firebird I get: $ /opt/fb30ss/bin/isql localhost/3333:/var/db/fb30/e30.fdb -ch utf8 $ /opt/fb30ss/bin/isql localhost/3333:/var/db/fb30/e30.fdb -ch utf8 -user Кузьмин -pas 123 $ /opt/fb30ss/bin/isql localhost/3333:/var/db/fb30/e30.fdb -ch utf8 -user "Кузьмин" -pas 123 |
1 similar comment
Commented by: @pavel-zotov Sorry, my firebird.conf contained Legacy_UserManager. But after changing it to default value and restart Firebird I get: $ /opt/fb30ss/bin/isql localhost/3333:/var/db/fb30/e30.fdb -ch utf8 $ /opt/fb30ss/bin/isql localhost/3333:/var/db/fb30/e30.fdb -ch utf8 -user Кузьмин -pas 123 $ /opt/fb30ss/bin/isql localhost/3333:/var/db/fb30/e30.fdb -ch utf8 -user "Кузьмин" -pas 123 |
Commented by: @AlexPeshkoff Once again - did you check how is locale set on your machine? |
Commented by: @pavel-zotov $ locale |
Commented by: @AlexPeshkoff Support for non-ascii logins is checked only when using SQL interface to manage users. Use of deprecated gsec and/or services API may be not possible. Appropriate locale should be correctly setup on both client and server. Non-ascii logins now do not differ in any way from ascii logins, including no case sensitivity (i.e. logins Zotov or ZOTOV are the same logins even when typed in russian). |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 2 [ 10586 ] |
Commented by: @pavel-zotov On LINUX with console charset = UTF8 it works fine: $ /opt/fb30ss/bin/isql -q SQL> select sec$user_name from sec$users; SQL> commit; connect 'localhost/3333:/var/db/fb30/c4760.fdb' user СИДОРОВ password '123'; USER СИДОРОВ SQL> select * from mon$attachments where mon$attachment_id=current_connection; But on Windows command prompt with console charset = DOS866 it looks worse: c:\>chcp C:\>C:\MIX\firebird\fb30\isql -q USRNAME SYSDBA USRNAME СИДЎРЎВ -------------- distortion of original given name! USRNAME СШДнРнв -------------- distortion of original given name! SQL> commit; |
Commented by: @pavel-zotov PS. One need to be noted that UserManager = Srp is mandatory setting to add users with such non-ascii names. C:\>C:\MIX\firebird\fb30\isql -q MON$AUTH_METHOD Legacy_Auth SQL> create or alter user "СИДОРОВ" password '123'; |
Commented by: @pavel-zotov PPS. If change codepage from dos866 to win1251 than things become more interesting. C:\>chcp C:\>C:\MIX\firebird\fb30\isql.exe -q SEC$USER_NAME СИДЎРЎВ SEC$USER_NAME СШДнРнв SQL> connect 'localhost/3333:c:\temp\c4760.fdb' user СИДОРОВ password '123'; Statement failed, SQLSTATE = 22018 SQL> connect 'localhost/3333:c:\temp\c4760.fdb' user СиДоРов password '456'; USER РЎРЁР"РЅР РЅРІ -------------------------------------- Displayed without error but with distortion :( |
Commented by: @AlexPeshkoff No, passwords were always case-sensitive |
Commented by: @aafemt It is not about case-sensitivity, but character set interoperability. User must be able to log in no matter what console locale is used - WIN1251, CP866, KOI8-R or UTF-8. |
Commented by: @pavel-zotov It seems that before build #31810 it was allowed to create two DIFFERENT logins with non-ascii characters that distinct from each other in case of letters ( e.g."SMIRNOFF" vs "SmIRnOFf" -- but typed in cyrillic letters). Sample:SQL> set list on; select sec$user_name from sec$users; SEC$USER_NAME SYSDBA SQL> create or alter user "СиДоРОв" password '123'; commit; SEC$USER_NAME SYSDBA SEC$USER_NAME СИДОРОВ SQL> commit; connect 'localhost/3333:e30' user "СИДорОв" password '890'; SQL> commit; connect 'localhost/3333:e30' user "СИДОРОВ" password '789'; SQL> commit; connect 'localhost/3333:e30' user "СИДОРОВ" password '890'; SQL> commit; connect 'localhost/3333:e30' user "СиДоРОв" password '890'; IMHO, current behaviour is much better than it was before. I can`t imagine practical necessity when there are two users which logins differ only in case (or accents :)) of their characters. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred Test Details: Wait for Alex confirmation that checks can be resumed - see last letter 11-MAY-2015 13:39 (subj: "[FB-Tracker] Commented: (CORE4760) ...") Test Specifics: [Platform (Windows/Linux) specific] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred => Done successfully Test Details: Wait for Alex confirmation that checks can be resumed - see last letter 11-MAY-2015 13:39 (subj: "[FB-Tracker] Commented: (CORE4760) ...") => Test Specifics: [Platform (Windows/Linux) specific] => |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
It seems that there is no explicit prohibition of creating user with name that containing non-ascii characters.
But currently it is not possible:
1) On Linux console, charset = UTF8:
$ /opt/fb30ss/bin/isql localhost/3333:/var/db/fb30/e30.fdb -z -ch utf8
ISQL Version: LI-T3.0.0.31797 Firebird 3.0 Beta 2
Server version:
LI-T3.0.0.31797 Firebird 3.0 Beta 2
LI-T3.0.0.31797 Firebird 3.0 Beta 2/tcp (oel64)/P13
LI-T3.0.0.31797 Firebird 3.0 Beta 2/tcp (oel64)/P13
Database: localhost/3333:/var/db/fb30/e30.fdb
SQL> create user "Кузьмин" password '123'; -- name of user typed in CYRILLIC letters
Statement failed, SQLSTATE = HY000
gsec error
SQL> exit;
2) GSEC also fails:
$ /opt/fb30ss/bin/gsec -user sysdba -pass masterke -add "Кузьмин" -pw 123
Bad international character in tag isc_spb_sec_username
Cannot transliterate character between character sets
Invalid or incomplete multibyte or wide character
Commits: 2e3438f 1351b11 3921d43 0ac40f7 FirebirdSQL/fbt-repository@838d32a FirebirdSQL/fbt-repository@39456cf FirebirdSQL/fbt-repository@0fea0fb FirebirdSQL/fbt-repository@979bc1f
The text was updated successfully, but these errors were encountered: