Bug 80999 - When click "Cancel" in password input dialog, Writer still opens the file as "plain text"
Summary: When click "Cancel" in password input dialog, Writer still opens the file as ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.2 rc
Hardware: x86 (IA32) All
: medium normal
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:5.2.0
Keywords: bibisected, bisected, regression
: 89320 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-07 10:40 UTC by Kevin Suo
Modified: 2016-10-25 19:03 UTC (History)
7 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 Kevin Suo 2014-07-07 10:40:19 UTC
When testing attachment 100193 [details] at bug 79476, I noticed the following:

when open it with libreoffice 4.3.0.2:
1. If you input a wrong password then click OK, it warns "Wrong Password", but if you then click "Cancel", writer still opens the file which then showing as "plain text" unreadable codes.
2. If you click "Cancel", Writer still opens it with unreadable codes.

Expected:
When click cancel, writer exits, rather than try to open it.
Comment 1 Yousuf Philips (jay) (retired) 2014-07-07 15:33:01 UTC
Yes i've seen this behaviour a few times when it doesnt understand the format of the file.
Comment 2 QA Administrators 2015-07-18 17:44:32 UTC Comment hidden (obsolete)
Comment 3 Maxim Monastirsky 2015-08-08 21:50:24 UTC
*** Bug 89320 has been marked as a duplicate of this bug. ***
Comment 4 Maxim Monastirsky 2015-08-08 22:00:56 UTC
I'll copy here my comment from Bug 89320:

What we should do here is to honor the MediaDescriptor::PROP_ABORTED that written by the oox detector, and stop the detection loop (and then also make sure that GUI users won't see the filter selection dialog).
Comment 5 raal 2016-02-22 20:53:18 UTC
This seems to have begun at the below commit.
Adding Cc: to  Michael Stahl ; Could you possibly take a look at this one?
Thanks

2bf0cc0044f10891eca579f07bf7b41ce2d6030c is the first bad commit
commit 2bf0cc0044f10891eca579f07bf7b41ce2d6030c
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 19:03:13 2015 +0800

    source-hash-e62339f856efa0b8ef03df3bf8b93e098c4ac0d3
    
    commit e62339f856efa0b8ef03df3bf8b93e098c4ac0d3
    Author:     Michael Stahl <mstahl@redhat.com>
    AuthorDate: Mon Feb 10 16:45:27 2014 +0100
    Commit:     Michael Stahl <mstahl@redhat.com>
    CommitDate: Mon Feb 10 17:02:58 2014 +0100
    
        fdo#73363: sd: fix mis-detection of Visio files as PPT
    
        SdFilterDetect::detect() erroneously detects all binary MSO files, and
        because the Visio types would be checked after PPT, Visio is pre-empted.
    
        Change-Id: I6ec3647a508dc8d79b47bfff6de35ccae39416ee

:040000 040000 6d44c297d066172eb951eedf8c4a8bb6131563da 249b09f6afaa45b7999171b9a2d363175750cfc9 M	opt
Comment 6 Commit Notification 2016-04-27 18:40:08 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=579c2de3a88483eff0664d3a303b19cbd386db47

tdf#80999 Canceling password prompt should abort detection

It will be available in 5.2.0.

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

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