Issue 21923

Summary: state in the save-as dialog that passwords need to be at least 5 characters long
Product: ui Reporter: frederikretsema <frederik.retsema>
Component: uiAssignee: mikhail.voytenko
Status: CLOSED FIXED QA Contact: issues@ui <issues>
Severity: Trivial    
Priority: P4 CC: giuseppe.castagno, issues, jan, kyoshida, lohmaier, sgautier.ooo, stefan.baltzer, thorsten.martens, zhangxiaofei.ooo
Version: OOo 1.1Keywords: oooqa, rfe_eval_ok
Target Milestone: 4.x   
Hardware: All   
OS: All   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 72764    
Attachments:
Description Flags
proposed patch for standard password dialog
none
revised beppec56's nice patch to apply to the latest milestone (committed into ooo-build).
none
The patch to uui project, dialogs modified according to specification
none
The patch to sfx2 project, password create dialog is integrated in interaction handler none

Description frederikretsema 2003-10-30 17:34:17 UTC
When saving a *.swx-file with a password, the password is asked, confirmed, but 
the "Ok"-button stays grayed. It therefore is impossible to save with password. 
Doesn't work within Windows'95 and Windows'98. Saving a spreadsheet with a 
password does work.
Comment 1 frederikretsema 2003-10-30 18:25:45 UTC
After retrying some times: it seems that the password must be at 
least 5 characters to work (it doesn't work with 4 characters in 
Spreadsheet and it does work with 5 characters in Writer). This is 
however not clear in this window. It would be better to allow less 
than 5 characters and after clicking Ok pop up a window that this is 
not allowed (just as the confirmation-password is incorrect). 

I will make this an "enhancement" instead of a "defect".
Comment 2 lohmaier 2003-11-11 21:57:58 UTC
it is stated in the help, but you're right that there should be an
indication that the password is not long enough. But I don't think
that accepting the password and then saying "Sorry, your password is
too short" would be desireable. Instead the Dialog should state
something like 
"Enter password (must be at least 5 characters)"

confirming, reassigning, updated summary, target-milestone not
determined, OS to ALL
Comment 3 stefan.baltzer 2003-11-28 15:56:21 UTC
SBA: Reassigned to Thorsten.
Comment 4 thorsten.martens 2003-12-01 10:57:27 UTC
TM->BH: Please have a look, thanks !
Comment 5 lohmaier 2004-12-26 19:47:21 UTC
*** Issue 39497 has been marked as a duplicate of this issue. ***
Comment 6 lohmaier 2004-12-26 19:48:38 UTC
reassigning to requirements.
Comment 7 lohmaier 2006-04-03 19:37:23 UTC
*** Issue 44979 has been marked as a duplicate of this issue. ***
Comment 8 Giuseppe Castagno (aka beppec56) 2006-07-29 13:06:29 UTC
Created attachment 38127 [details]
proposed patch for standard password dialog
Comment 9 Giuseppe Castagno (aka beppec56) 2006-07-29 13:09:22 UTC
The patch I attached simply adds a test string to the standard password dialog.
It is changed according to SfxPasswordDialog::mnMinLen data member.
It's based on src680-m177 tag and it's a little improved wrt the one proposed in
issue 44979, desc2.
This password dialog seems to be the one more widely used throughout OOo.

If the calling sequence is something as:

	SfxPasswordDialog aPwdDialog( this );
	aPwdDialog.SetMinLen( 0 );
	aPwdDialog.ShowExtras( SHOWEXTRAS_CONFIRM );
	aPwdDialog.SetText( sDlgTitle );
	if( aPwdDialog.Execute() == RET_OK )  //OK issued get password and set it
		sDestPassword = aPwdDialog.GetPassword();

Then the minimum password length required will be shown to the user.
Comment 10 Mathias_Bauer 2007-05-28 17:54:58 UTC
Mikhail, please have a look
Comment 11 mikhail.voytenko 2007-05-29 13:07:44 UTC
The patch looks good. The string specifying the number of required symbols
should be probably changed, I will ask the UserExp. The empty password will be
never accepted, so there is no need to have the related string.
Comment 12 frank.loehmann 2007-05-29 13:27:52 UTC
FL: See section 6.2 'New Password Dialogs' in the following spec: 
http://specs.openoffice.org/appwide/security/Electronic_Signatures_and_Security.sxw
I have updated the spec and moved these new passowrd dialogs from the Future
section to the specification part.
Comment 13 mikhail.voytenko 2007-05-29 15:01:34 UTC
Ok, the new specs requires more changes than I have expected. So this task is
now about the dialogs reimplementation to adjust them to the new specs. I am
changing the type to enhancement.
Comment 14 mikhail.voytenko 2007-06-12 15:08:49 UTC
Changing the target.
Comment 15 kyoshida 2007-10-01 18:07:31 UTC
Created attachment 48633 [details]
revised beppec56's nice patch to apply to the latest milestone (committed into ooo-build).
Comment 16 mikhail.voytenko 2007-10-02 09:27:07 UTC
mav->kohei: As I have already written the change has to be done according the
new specification provided by FL. So this patch is not acceptable, sorry.
Comment 17 kyoshida 2007-10-02 20:58:35 UTC
mav: yes, I'm aware.  I'm just posting this patch just in case other people need
it as an interim solution.
Comment 18 mikhail.voytenko 2007-11-09 11:24:17 UTC
The new dialog will be integrated into 3.0. Changing the target.
Comment 19 jankratochvil 2008-01-21 21:15:28 UTC
Please revert this patch together with the whole password length restriction:
It is more important OOo is INCOMPATIBLE with the Microsoft Office as it does
not allow the short passwords - despite MS Office apparently allows it.
I got now a MS Excel document encrypted by password "150" (three letters) and I
could not convert it into ODS with the same password.
There may be some warnings but such short password should be permitted in
general - it is the user's document, please do not dictate her how well should
be her data protected.
Comment 20 kyoshida 2008-01-21 21:30:00 UTC
@jankratochvil

For what it's worth, the attached patch only displays the required password
length in the UI when appropriate instead of making it secret.  The patch itself
does not set the required password length.
Comment 21 jankratochvil 2008-01-21 21:36:03 UTC
@kohei

OK, moved to the new Issue 85453.
Comment 22 zhangxiaofei.ooo 2008-04-10 03:16:03 UTC
Created attachment 52701 [details]
The patch to uui project, dialogs modified according to specification
Comment 23 zhangxiaofei.ooo 2008-04-10 03:17:45 UTC
Created attachment 52702 [details]
The patch to sfx2 project, password create dialog is integrated in interaction handler
Comment 24 mikhail.voytenko 2008-04-10 09:08:14 UTC
mav->zhangxiaofei:
Thank you for the patch, it looks good. There is a small failure in the method
FileDialogHelper_Impl::execute()
it is not checked whether the password was entered (
RequestDocumentPassword::isPassword() method should be used ) or a cancel was
pressed. As result, if user presses cancel the saving process will not stop. But
it is a small change and can be introduced during integration.

Unfortunately the UI change is relative big to be taken for OOo3.0, only small
and important changes are planned to be taken after the Beta. Changing the
target to OOo3.1.
Comment 25 mikhail.voytenko 2008-04-10 09:11:36 UTC
Ups, in my last comment please read
"...only small and important
UI  changes are planned to be taken after the Beta."
^^^
Comment 26 mikhail.voytenko 2008-11-17 16:44:38 UTC
integrated in fwk92
Comment 27 mikhail.voytenko 2008-11-24 17:27:11 UTC
mav->tm: Please test the new implementation. Please see section 6.2 'New
Password Dialogs' in the following spec: 
http://specs.openoffice.org/appwide/security/Electronic_Signatures_and_Security.sxw
Comment 28 thorsten.martens 2008-12-08 10:18:54 UTC
Checked and verified in cws fwk92 -> OK !
Comment 29 sgautier.ooo 2009-03-27 19:32:32 UTC
The behaviour does not correspond to the specs. When you enter a password that
doesn't match, the dialog "The password confirmation does not match." appears,
but when you click OK, both fields are not empty when the spec says "The
password dialog is being shown after pressing the OK button. The focus is then
set to the “Enter Password” field and both input fields are empty." Only the
second field is cleared.
Kind regards - Sophie
Comment 30 sgautier.ooo 2009-03-27 19:33:26 UTC
The behaviour does not correspond to the specs. When you enter a password that
doesn't match, the dialog "The password confirmation does not match." appears,
but when you click OK, both fields are not empty when the spec says "The
password dialog is being shown after pressing the OK button. The focus is then
set to the “Enter Password” field and both input fields are empty." Only the
second field is cleared.
Kind regards - Sophie
Comment 31 sgautier.ooo 2009-03-27 19:35:07 UTC
adding me to cc - 
Comment 32 Martin Hollmichel 2009-04-17 15:29:12 UTC
reassign and re-target
Comment 33 mikhail.voytenko 2009-04-20 05:50:59 UTC
It is never good to mix multiple problems in the same issue. There is a
successor issue 101207 related to the password field cleaning. The problem
referred in this issue is fixed and verified by tm.
Comment 34 mikhail.voytenko 2009-04-20 05:52:09 UTC
Setting back to verified.
Comment 35 thorsten.ziehm 2009-07-20 14:40:36 UTC
This issue is closed automatically and wasn't rechecked in a current version of
OOo. This fixed issue should be integrated in OOo since more than half a year.
If you think this issue isn't fixed in a current version (OOo 3.1), please
reopen it and change the field 'Target Milestone' accordingly.

If you want to download a current version of OOo =>
http://download.openoffice.org/index.html
If you want to know more about the handling of fixed/verified issues =>
http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues
Comment 36 thorsten.ziehm 2009-07-20 15:35:21 UTC
Sorry this issue was wrongly closed. This issue will be reopened automatically.
And will be set after that back to fixed/verified.
Comment 37 thorsten.ziehm 2009-07-20 15:39:53 UTC
Set to state 'fixed'.
Comment 38 thorsten.ziehm 2009-07-20 15:44:07 UTC
Set back to state 'verified/fixed'.

Again. Sorry for the mass of mails.
Comment 39 thackert 2010-08-23 17:37:49 UTC
Hello frederikretsema, thorstenziem, *,
I stumbled upon this issue during my TCM test. On my system (Debian
SID/Experimental AMD64) I am able to enter a password with only one character
(though I find it a dumb idea to allow such short passwords. They will not
protect the document but will lighten the cracking of the password enormously
... :( ), so I think, this issue is fixed. Could someone else confirm this (and
hopefully close this issue afterwards as "closed fixed")?
TIA
Thomas.