Bug 132118 - LoadComponentFromURL called with a wrong password prompts for a password.
Summary: LoadComponentFromURL called with a wrong password prompts for a password.
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 11:47 UTC by Wolfgang Jäger
Modified: 2021-09-20 09:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A slightly reworked version of the mentioned helper from 2 years ago. (87.67 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-04-15 11:47 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2020-04-15 11:47:33 UTC
Created attachment 159578 [details]
A slightly reworked version of the mentioned helper from 2 years ago.

Code example in Basic:  

srvSupplier = ThisComponent.CurrentController.Frame
Dim args(0) As New com.sun.star.beans.PropertyValue
args(0).Name  = "Password"
args(0).Value = "A wrong Password" REM Actually taken from a SheetCellRange.
targetDoc = srvSupplier.loadComponentFromURL(pUrl, "_blank", 0, args)

Condition: The password supplied via args(0).Value is wrong.
Expected: targetDoc is made the Null object.  
Experienced : A prompt to enter a password is casted.

Why bad? (E.g.) 
A few years ago I wrote a provisional helper for recolleting a forgotten password (See: https://ask.libreoffice.org/en/question/145716/). It can no longer work unattended due to the new behaviour.  

The behaviour is independent of whether I use a controller's frame or the StarDesktop to call 'loadComponentFromURL'. 

Remedy?
Workaround: A second PropertyValue to pass with 'args' and set to:
args(1).Name  = "Hidden"
args(1).Value = True
Disadvantage: Old code formerly doing its duty must be changed.
Comment 1 Wolfgang Jäger 2020-07-08 14:01:10 UTC
Works for me now in V6.4.4 and 7.0.0.0.beta1.
Setting to RESOLVED WORKSFORMR
Comment 2 Wolfgang Jäger 2021-09-20 09:32:15 UTC
Due to a message I got concerning the removal of a Whitboard entry (Xisco Faulí),
I just tested with V 7.2.0.4.  

The reported issue was present again.  
RESOLVED WORKSFORME --> REOPENED