Skip to content

Verify difference file path against DatabaseAccess#9089

Open
caolanm wants to merge 1 commit into
FirebirdSQL:masterfrom
caolanm:master
Open

Verify difference file path against DatabaseAccess#9089
caolanm wants to merge 1 commit into
FirebirdSQL:masterfrom
caolanm:master

Conversation

@caolanm

@caolanm caolanm commented Jul 12, 2026

Copy link
Copy Markdown

The difference file opened in openDelta and beginBackup is not verified against DatabaseAccess, unlike the other database file paths. This looks like an oversight, presumably the setting is meant to cover every file the engine opens by path. Found while using the embedded engine from LibreOffice.

The difference file opened in openDelta and beginBackup was not verified
against DatabaseAccess like the other database file paths.
@hvlad

hvlad commented Jul 12, 2026

Copy link
Copy Markdown
Member

Hmm... why do you think difference file placement must be verified exactly this way, i.e. against DatabaseAccess ?
Do you want, for example, backup files placement to be verified also ? Note, physical backup of level 0 is the database copy.

@hvlad

hvlad commented Jul 12, 2026

Copy link
Copy Markdown
Member

presumably the setting is meant to cover every file the engine opens by path

Not agree, sorry

@caolanm

caolanm commented Jul 13, 2026

Copy link
Copy Markdown
Author

LibreOffice, optionally, supports embedded firebird databases so we'd like to not allow arbitrary dbs, that a user might receive from someone else, to specify what file paths they backup to and the LibreOffice firebird save
is via the backup mechanism.

tdf-gerrit pushed a commit to LibreOffice/core that referenced this pull request Jul 14, 2026
A database we extract from a .odb is always in the normal backup state,
so refuse one that is not, we're not interested in the difference file
mode case.

firebird upstream attempt as:
FirebirdSQL/firebird#9089

And do it manually for the system-firebird case.

Change-Id: Iff9ebbb075379ca47a7f7f5886b693ac23860566
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/6702
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e7ea381e87cadaf31bf1ad2213a23f17a6284d1c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208040
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
tdf-gerrit pushed a commit to LibreOffice/core that referenced this pull request Jul 14, 2026
A database we extract from a .odb is always in the normal backup state,
so refuse one that is not, we're not interested in the difference file
mode case.

firebird upstream attempt as:
FirebirdSQL/firebird#9089

And do it manually for the system-firebird case.

Change-Id: Iff9ebbb075379ca47a7f7f5886b693ac23860566
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/6702
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e7ea381e87cadaf31bf1ad2213a23f17a6284d1c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208040
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208064
Tested-by: Jenkins
tdf-gerrit pushed a commit to LibreOffice/core that referenced this pull request Jul 14, 2026
A database we extract from a .odb is always in the normal backup state,
so refuse one that is not, we're not interested in the difference file
mode case.

firebird upstream attempt as:
FirebirdSQL/firebird#9089

And do it manually for the system-firebird case.

Change-Id: Iff9ebbb075379ca47a7f7f5886b693ac23860566
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/6702
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e7ea381e87cadaf31bf1ad2213a23f17a6284d1c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208040
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208064
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208076
@AlexPeshkoff

AlexPeshkoff commented Jul 14, 2026 via email

Copy link
Copy Markdown
Member

@hvlad

hvlad commented Jul 14, 2026

Copy link
Copy Markdown
Member

LibreOffice, optionally, supports embedded firebird databases so we'd like to not allow arbitrary dbs, that a user might receive from someone else, to specify what file paths they backup to and the LibreOffice firebird save is via the backup mechanism.

LibreOffice might issue ALTER DATABASE ADD DIFFERENCE FILE <filename> or 'ALTER DATABASE DROP DIFFERENCE FILE' whenever it opens such "foreign" database or before physical backup start.

See https://www.firebirdsql.org/file/documentation/html/en/firebirddocs/nbackup/firebird-nbackup.html#nbackup-deltafile

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants