Download it now!
Bug 97416 - Editing: Database password properties in ODB file not re-settable via UI
Summary: Editing: Database password properties in ODB file not re-settable via UI
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.0.0 target:6.4.5
Keywords:
Depends on:
Blocks: ODF-export-invalid Privacy
  Show dependency treegraph
 
Reported: 2016-01-28 15:17 UTC by Heinz-Dieter
Modified: 2020-05-17 09:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heinz-Dieter 2016-01-28 15:17:10 UTC
Linux 5.0.2.2 de
Win 5.0.3.2 de
Win 5.0.4.x de

the check in "Password need" writes in Contend.xml
"<db:login db:user-name="anyone" db:is-password-required="true"/>
but the uncheck dos not work. there is no change in Contend.xml

Only edit Contend.xml solve this problem.
Comment 1 Buovjaga 2016-01-28 18:49:12 UTC
Edit / Database / Properties is greyed out for me. How can I activate it?
Comment 2 Heinz-Dieter 2016-01-28 21:11:53 UTC
(In reply to Beluga from comment #1)
> Edit / Database / Properties is greyed out for me. How can I activate it?

When you use a database HSQLDB you don't need this.
When using a postgreSQL DB it is aktive and not greyed out.

There are two ways to logon:
The same user as the Linux User is defined in the DB, there is not a password required.
If you want to connect with an other user, then a password is needed.
Comment 3 Robert Großkopf 2016-02-07 19:14:07 UTC
Could not confirm this bug.
Have tested this:
Opened a database, which needs a password (MySQL - direct connection).
Unchecked in Edit > Database > Properties "Password need".
Closed the *.odb-file and opened again.
When trying to connect to the database (changing to the table-container) it throws an error:
Access denied ... (using password: NO)

... but I would never use a Server-database without a different password as required for a normal user on my system ...

My system: OpenSUSE 42.1 64bit rpm Linux, LO 5.0.5.1.

Version in this bug is wrong. I have set it to the first version the bug is reported for ...
Comment 4 Lionel Elie Mamane 2016-06-06 15:10:43 UTC
(In reply to robert from comment #3)

> ... but I would never use a Server-database without a different password as
> required for a normal user on my system ...

In PostgreSQL, an option is that a local user can connect to a database as the same user without any password; the (e)uid of the calling process is checked and this is trusted.
Comment 5 Alex Thurgood 2016-06-10 06:56:51 UTC
Changed title to reflect bug description
Comment 6 Alex Thurgood 2016-06-10 07:32:09 UTC
Confirming with LO 5132 on OSX 10.11.5

How to reproduce :

1) Create an ODB file that connects to an existing posgres db.
2) Enter a username/password for connecting to the db - test the connection.
3) Complete the wizard and save the odb file.
4) In the tables mode of the ODB container window, right mouse button click in the lower window and choose Database > Properties
5) Untick the password box.
6) Save the ODB file, close it and quit LO.
7) Now inspect the ODB file by unzipping it (changing extension from odb to zip as necessary dependent on your OS and any built in archive tools). Look at the file content.xml. It contains the following :

xlink:href="sdbc:postgresql:postgresql://localhost/alex" xlink:type="simple"/><db:login db:user-name="alex" db:is-password-required="true"/></db:connection-data><db:driver-settings 

Confirming.
Comment 7 Lionel Elie Mamane 2016-06-10 07:37:29 UTC
Is this specific to Postresql connections or does it happen also with ODBC or JDBC or any other connection type where "needs password" is not greyed out?
Comment 8 Wolfgang 2016-07-31 20:47:23 UTC
Same thing happens with my jdbc connection between Base (Version: 5.1.4.2
Build ID: 1:5.1.4-0ubuntu1) and database Firebird 3.0 on Linux Mint 18. This does not have anything to do with Firebird, as shown by the workaround.

Workaround:
Know that the *.odb-file is really a *.zip-Archive that contains all the settings. Open and edit it:

1. Rightclick on *.odb - file
2. Open With File-Roller (German: Archivverwaltung) or any application that opens *.zip files; you should see a datastructure now with folder "Configurations2, folder "forms"... until file "settings.xml". In the middle you see file "content.xml".
3. Open file "content.xml" with any simple text editor (in my case: xed).
4. Search for db:is-password-required.
5. You'll find: db:is-password-required="true".
6. Change this to db:is-password-required="false".
7. Save and close file "content.xml".
8. Close file-roller or whatever you unpacked the *odb-file.

That's it. Now you can open your database without entering a password and, if you want to check, the field "Password required" in the configuration window Connection settings (Get there by: Menu | Edit | Database | Properties) is unchecked.
Comment 9 Wolfgang 2016-07-31 21:00:45 UTC
Suggestion of a fix:

My workaround in comment 8 (Wolfgang 2016-07-31 20:47:23 UTC) suggests strongly that the bug's reason is that unchecking the the 

Menu | Edit | Database | Properties | "Password required" checkbox

does not set entry in file content.xml in zip-archive/file *.odb) from 'db:is-password-required="true"' to 'db:is-password-required="false"'. However (I just tested it): Checking the "Password required" checkbox *does* set the above mentioned entry to 'db:is-password-required="true"'!

Thus, the bug is between the user interface and the underlying *.odb file; that should not be too hard to fix (repair one line?).

Good luck! And thank you to whomever does this.
Comment 10 QA Administrators 2017-09-01 11:16:33 UTC Comment hidden (obsolete)
Comment 11 Alex Thurgood 2017-09-05 09:29:50 UTC
Bug not surprisingly still present in

Version: 5.4.0.3
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 12 Stang 2017-12-23 23:40:37 UTC
This bug is still present in Beta of:

Version: 6.0.0.1
Build ID: d2bec56d7865f05a1003dc88449f2b0fdd85309a
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

Please note:  This also involves those using 'split' databases  where an errant setting cannot be cleared without editing the 'content.xml' file.
Comment 13 mpdwibble 2018-06-07 13:08:25 UTC
bug still present 

Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
Windows 10
Comment 14 QA Administrators 2019-10-03 03:00:26 UTC Comment hidden (obsolete)
Comment 15 Julien Nabet 2020-05-16 18:19:47 UTC
On pc Debian x86-64 with master sources updated today + postgres native, I could reproduce this.

I submitted a patch here:
https://gerrit.libreoffice.org/c/core/+/94363
Comment 16 Commit Notification 2020-05-17 07:05:14 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/71c8f9cf3825b53efc8841fa3bc9144e90bc189a

tdf#97416: fix Database password properties in ODB file not re-settable via UI

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Julien Nabet 2020-05-17 07:36:43 UTC
Patch waiting for review for 6.4 branch:
https://gerrit.libreoffice.org/c/core/+/94374
Comment 18 Commit Notification 2020-05-17 09:20:57 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/10444727db12d371e99c4ce4bdb74cf9ca8b87b8

tdf#97416: fix Database password properties in ODB file not re-settable via UI

It will be available in 6.4.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.