fbsvcmgr action_add_user creates user with EMPTY login when its (double-quoted) 
name starts with TWO apostrophes
----------------------------------------------------------------------------------------------------------------

                 Key: CORE-5072
                 URL: http://tracker.firebirdsql.org/browse/CORE-5072
             Project: Firebird Core
          Issue Type: Bug
          Components: SVCMGR
    Affects Versions: 3.0 RC1
            Reporter: Pavel Zotov


command #1:

fbsvcmgr localhost:service_mgr user sysdba password masterkey action_add_user 
dbname C:\MIX\firebird\fb30\security3.fdb sec_password 1 sec_username "''foo1"

output: empty, i.e. all OK (fingers crossed... :))

command #2:

fbsvcmgr localhost:service_mgr user sysdba password masterkey action_add_user 
dbname C:\MIX\firebird\fb30\security3.fdb sec_password 1 sec_username "''foo2"

STDERR:

When user_mgr = Legacy:
-violation of PRIMARY or UNIQUE KEY constraint "INTEG_2" on table "PLG$USERS"
-Problematic key value is ("PLG$USER_NAME" = '')

When user_mgr = Srp:
An error occurred while attempting to add the user.
-violation of PRIMARY or UNIQUE KEY constraint "INTEG_5" on table "PLG$SRP"
-Problematic key value is ("PLG$USER_NAME" = '')

command #3:

echo drop user "''foo1"; | isql /:e30

STDERR (for both Legacy and Srp):

Statement failed, SQLSTATE = HY000
record not found for user: ''foo1

command #4:

echo set count on; set width uname 10; select row_number()over(), sec$user_name 
uname, char_length(trim(sec$user_name)) from sec$users; | isql /:e30

STDOUT (for both Legacy and Srp):

ROW_NUMBER UNAME       CHAR_LENGTH
========== ========== ============
         1 SYSDBA                6
         2                       0
Records affected: 2

################################################

No such trouble  when above mentioned is done in ISQL, for both user_mgr = Srp 
and Legacy:

C:\MIX\firebird\QA\fbt-repo>isql /:e30
Database: /:e30, User: SYSDBA
SQL> create or alter user "''foo1" password '1';
SQL> create or alter user "''foo2" password '1';
SQL> commit;
SQL> show users;
Users in the database
  0  ''foo1                              0  ''foo2
  1 #SYSDBA
SQL> set count on; set width uname 10; select row_number()over(), sec$user_name 
uname, char_length(trim(sec$user_name)) from sec$users;


           ROW_NUMBER UNAME       CHAR_LENGTH
===================== ========== ============
                    1 SYSDBA                6
                    2 ''foo1                6
                    3 ''foo2                6

Records affected: 3
SQL> drop user "''foo1";
SQL> drop user "''foo2";
SQL> exit;


PS. WI-V3.0.0.32268

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to