Bug 229455

Summary: cannot open spreadsheet files
Product: [Fedora] Fedora Reporter: Marius Andreiana <marius.andreiana>
Component: shared-mime-infoAssignee: Bastien Nocera <bnocera>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-21 17:21:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
open document spreadsheet none

Description Marius Andreiana 2007-02-21 09:36:55 UTC
Description of problem:
install Sun Java SE 6.0 rpm
nautilus will see .ods as application/x-java-archive

Opening it:
The filename "file.ods" indicates that this file is of type "ODS spreadsheet".
The contents of the file indicate that the file is of type "Java Archive". If
you open this file, the file might present a security risk to your system.

Do not open the file unless you created the file yourself, or received the file
from a trusted source. To open the file, rename the file to the correct
extension for "Java Archive", then open the file normally. Alternatively, use
the Open With menu to choose a specific application for the file. 

Only available option: cancel

The general issue is upstream unsolved since 2004-03-25
http://bugzilla.gnome.org/show_bug.cgi?id=138033

Comment 1 Bastien Nocera 2007-02-21 11:12:33 UTC
Where could I get a .ods file to test with?

Comment 2 Marius Andreiana 2007-02-21 13:38:10 UTC
Created attachment 148476 [details]
open document spreadsheet

Comment 3 Marius Andreiana 2007-02-21 13:38:37 UTC
Start OpenOffice Spreadsheet, type something, save.
I've attached one for your convenience :)

Comment 4 Bastien Nocera 2007-02-21 14:56:29 UTC
(In reply to comment #0)
> Description of problem:
> install Sun Java SE 6.0 rpm

I missed that bit. Does this package include some xml files in
/usr/share/mime/packages/ ?

If so, then it's probably breaking the association used in shared-mime-info.

> nautilus will see .ods as application/x-java-archive


Comment 5 Marius Andreiana 2007-02-21 17:12:20 UTC
Yes it does:
/usr/java/jdk1.6.0/jre/lib/desktop/mime/packages/x-java-archive.xml
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-java-archive">
...
     <glob pattern="*.jar"/>
    <magic priority="85">
      <match type="string" value="PK\003\004" offset="0">
        match type="host16" value="0xcafe" offset="40" />
      </match>
    </magic>
  </mime-type>
</mime-info>


However, the point remains that with Java installed, documents cannot be opened
anymore. The Nautilus dialog should be the above warning + buttons:
[Open with OpenOffice] [Open with java] [Do not open]

Thanks

Comment 6 Bastien Nocera 2007-02-21 17:21:47 UTC
And I believe the problem lies with the mime-info provided by the Java SDK.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6510610