FirebirdSQL / firebird

Firebird server, client and tools
https://firebirdsql.org
1.26k stars 217 forks source link

Firebird V2 RC2 shutdown [CORE1] #319

Closed firebird-automations closed 18 years ago

firebird-automations commented 18 years ago

Submitted by: jjberry (jjberry)

Attachments: TestApp.zip

SFID: 1497360#⁠ Submitted By: jjberry

The FBserver shutsdown when a user password is attempted to be modified to a empty string.

The Delphi Client Application uses FIBPLUS Services components to update passwords. The application failed to check for empty string.

OS Platform: Win XP Firebird V2 RC2

Commits: FirebirdSQL/firebird@8282be035473d536cc01950ed76339982568c770 FirebirdSQL/firebird@c1303cefa9c618f87e0658f240f8ee4bb83c6fe1

firebird-automations commented 18 years ago

Commented by: Alice F. Bird (firebirds)

Date: 2006-05-30 10:20 Sender: alexpeshkoff Logged In: YES user_id=423445

Can you attach .exe (without .bpl and Delphi-specific .dll dependencies) and instructions how to run it. I'll try to reproduce on linux.

firebird-automations commented 18 years ago
Modified by: Dimitrios Chr. Ioannidis (dchri) Version: 2\.0 RC2 \[ 10032 \] assignee: Dmitry Yemanov \[ dimitr \] SF\_ID: 1497360 =\>
firebird-automations commented 18 years ago

Commented by: @dyemanov

I cannot reproduce the issue with either IBX or FIBPlus. Without a binary test case, this issue will be rejected as irreproducable.

firebird-automations commented 18 years ago

Commented by: jjberry (jjberry)

Alex

Please find attached the delphi app. It has two edit boxes one for the computername where the firebird server is running, and one for the user who's password will attempt to be set to empty string. Once you filled in the two edit boxes then press update button. You should then see the firebird server has crashed. The application connects to the firebird server using username=sysdba password=masterkey

firebird-automations commented 18 years ago
Modified by: jjberry (jjberry) Attachment: TestApp\.zip \[ 10023 \]
firebird-automations commented 18 years ago

Commented by: @dyemanov

Confirmed.

firebird-automations commented 18 years ago

Commented by: @dyemanov

AFAIU, this may be fixed in either ClumpletReader::getString() or string::assign() - if the input string is empty, the explicit length argument should be ignored. Currently, we have two zero bytes in the string buffer and stringLength = 1, and this is wrong.

But anyway, the input SPB is incorrect: [01, 00, 00], i.e. length and string value itself don't match each other. Looks like a bug in the connectivity library...

firebird-automations commented 18 years ago
Modified by: @dyemanov assignee: Dmitry Yemanov \[ dimitr \] =\> Alexander Peshkov \[ alexpeshkoff \]
firebird-automations commented 18 years ago

Commented by: @dyemanov

Could you please also attach the source code for this test app? And BTW, what version of FIBPlus do you use? This information is necessary for the FIBPlus developers to fix the possible issue in the library. It's very possible that FB2 Final will throw an error for invalid SPBs entries.

firebird-automations commented 18 years ago
Modified by: @dyemanov status: Open \[ 1 \] =\> Resolved \[ 5 \] resolution: Fixed \[ 1 \] Fix Version: 2\.0 RC3 \[ 10040 \] SF\_ID: 1497360 =\>
firebird-automations commented 18 years ago

Commented by: jjberry (jjberry)

unit Unit1;

interface

uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, IB_Services, StdCtrls;

type TForm1 = class(TForm) Button1: TButton; SecurityService: TpFIBSecurityService; Edit1: TEdit; Label1: TLabel; Edit2: TEdit; Label2: TLabel; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;

var Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject); var Password : string[8]; begin Password := chr(0); SecurityService.ServerName := Edit2.Text; SecurityService.Active := true; try SecurityService.UserName := Edit1.Text; SecurityService.Password := Password; try SecurityService.ModifyUser; except end; finally SecurityService.Active := false; end; end;

end.

firebird-automations commented 18 years ago

Commented by: jjberry (jjberry)

We are currently using FIBPlus 6.25

firebird-automations commented 18 years ago

Commented by: @pmakowski

Q/A tested ok

firebird-automations commented 18 years ago
Modified by: @pmakowski status: Resolved \[ 5 \] =\> Closed \[ 6 \] SF\_ID: 1497360 =\>
firebird-automations commented 16 years ago
Modified by: @pcisar Workflow: jira \[ 10025 \] =\> Firebird \[ 14153 \]
firebird-automations commented 8 years ago
Modified by: @pavel-zotov QA Status: No test
firebird-automations commented 8 years ago
Modified by: @pavel-zotov status: Closed \[ 6 \] =\> Closed \[ 6 \] QA Status: No test =\> Done successfully