Invalid shared-mime XML file installed

Bug #150851 reported by Stéphane Loeuillet
88
Affects Status Importance Assigned to Milestone
Miro
Fix Released
Unknown
miro (Ubuntu)
Fix Released
Low
Chris Halse Rogers

Bug Description

Binary package hint: democracyplayer

Miro install an xml file into $prefix/share/mime/package/ named miro.xml

This file is not valid XML :

<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
   <mime-type type="application/x-miro">
     <comment>Miro Subscription File</comment>
     <glob pattern="*.miro"/>
   </mime-type>
</mime-info>

<!-- Old style subscription files. -->
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
   <mime-type type="application/x-democracy">
     <comment>Democracy Subscription File</comment>
     <glob pattern="*.democracy"/>
   </mime-type>
</mime-info>

should be :

<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">

<!-- New style subscription files. -->
   <mime-type type="application/x-miro">
     <comment>Miro Subscription File</comment>
     <glob pattern="*.miro"/>
   </mime-type>

<!-- Old style subscription files. -->
   <mime-type type="application/x-democracy">
     <comment>Democracy Subscription File</comment>
     <glob pattern="*.democracy"/>
   </mime-type>

</mime-info>

Revision history for this message
Chris Halse Rogers (raof) wrote :

I'm pretty sure this was fixed in the miro-0.9.8.1-0ubuntu4 upload. Can you check what version of the miro package you have installed? Either -0ubuntu4 or -0ubuntu5 should already have this fixed.

Changed in miro:
assignee: nobody → raof
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

I have latest gutsy x86-64 package
I'll report exact version number tonight once I'm back at home

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

It seems to be fixed. However .miro files and .democracy files are still not associated with miro/democracy.

Translated error message: The contents is a text file, but the extension suggests a democracy file. This is a security problem.

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

I forgot. Steps to reproduce:

 - You install Gutsy and make sure its up to date (9/10/2007)
 - you install Miro.
 - You go to the channel guide (which is just a gecko component)
 - You click on the 'add channel' button for any channel.
 - It now tries to open the link in my default internet browser (epiphany)
 - But epiphany, like miro has no no clue what to do with it.
 - So it asks me if I want to open or download it. I choose open.
 - It does nothing.
 - So i manually double-click the file. (epiphany does not delete files it downloads like firefox)
 - Now I get a security error: contents is text-file, but extension suggests .democracy file.

Perhaps I'm wrong assuming this bug is related, but I think it is. Something is wrong with the file-type/mime-type association for .miro and .democracy files.

Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

My fault, checking installed version, the culprit was miro-data ... 0.9.9.1-1ubuntupcf
So, it is not the official Ubuntu package but a newer one from another repository
http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu/feisty/
It is the official Miro repo.
Has this been reported/fixed upstream ??
It is fixed in Gutsy version.
-------------------------------------------------------------------------------------------------------------------
Ralf Nieuwenhuijsen 's problem is different.
Those XML files are just here to declare to nautilus how to detect that a file is of this particular mime-type. (here, by file extension)

Mime type to application mapping is done in /usr/share/applications/miro.desktop , MimeType entry :
MimeType=application/x-miro;application/x-democracy;application/x-bittorrent;video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;application/x-matroska;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;

So, I'm closing this bug as invalid

Changed in miro:
status: Incomplete → Invalid
Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

My fault, checking installed version, the culprit was miro-data ... 0.9.9.1-1ubuntupcf
So, it is not the official Ubuntu package but a newer one from another repository
http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu/feisty/
It is the official Miro repo.
Has this been reported/fixed upstream ??
It is fixed in Gutsy version.
-------------------------------------------------------------------------------------------------------------------
Ralf Nieuwenhuijsen 's problem is different.
Those XML files are just here to declare to nautilus how to detect that a file is of this particular mime-type. (here, by file extension)

Mime type to application mapping is done in /usr/share/applications/miro.desktop , MimeType entry :
MimeType=application/x-miro;application/x-democracy;application/x-bittorrent;video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;application/x-matroska;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;

So, I'm closing this bug as invalid

Revision history for this message
Markus Golser (golserma) wrote :

I report it upstream

Changed in democracy:
status: Unknown → Confirmed
Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

The mime-types are there in the .desktop file, so why is it not working?
Is adding channels within miro, or by using a webbrowser working for anybody?

Nautilus claims .democracy files are text-files not miro's files?

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

Wait: it claims they are democracy files _until_ i click them. (not execute them)
When executing, they claim that the content and the file-extension do not match.
The content is said to be text/plain.

If I run the following command in a terminal:
file subscribe.democracy

I get:
subscribe.democracy:xml

So, it seems nautilus is 'detecting' it as a text-file because its an xml file.
How to override this?

Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

Perhaps the problem is that in the mime description, nothing says that those 2 mime types inherits text/xml (which itself inherits text/plain)

In clear, both mime types lack :
<sub-class-of type="application/xml"/>

<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">

<!-- New style subscription files. -->
   <mime-type type="application/x-miro">
     <sub-class-of type="application/xml"/>
     <comment>Miro Subscription File</comment>
     <glob pattern="*.miro"/>
   </mime-type>

<!-- Old style subscription files. -->
   <mime-type type="application/x-democracy">
     <sub-class-of type="application/xml"/>
     <comment>Democracy Subscription File</comment>
     <glob pattern="*.democracy"/>
   </mime-type>

</mime-info>

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

Yes, that makes it work within nautilus!
Thank you.

Unfortunately, somehow add-channel within miro is still not working.
It spawns the link in the chosen browser (epiphany in my case), afterwhich i have to manually double-click it.
But at least that part works now. I'll go look at how miro (which uses xul and gecko) figures out the mime-type.

Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

Ralph, I think you'll have to open a new bug for the problem I solved (missing sub-class-of)
so that there is only one issue per bug

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

There is already a related bug #150674 which is about add-channel not working. Unfortunately that problem seems to be unrelated.

I think this particular fix belongs here, because it is _still_ about an invalid shared-mime XML file.
I also hope that bugs get fixed. Upstream works, but I doubt they will do an UVF-exception for it.

Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

True that the missing sub-class-of is a problem. Reopening the bug

Changed in miro:
status: Invalid → Confirmed
Changed in democracy:
status: Confirmed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote :
Download full text (4.3 KiB)

miro (1.0-1ubuntu1) hardy; urgency=low

  * Merge from Debian unstable (LP: #162310). Remaining Ubuntu changes:
    + debian/control:
      - libxul-dev -> firefox-dev
      - DebianMaintainerField
      - Provide real transitional democracyplayer package
    + debian/pyversions
      - 2.4 -> 2.5
    + debian/rules
      - Use pyversions rather than hardcoding 2.4
  * New upstream version fixes invalid mime file (LP: #150851, LP: #150674)
  * debian/rules:
    + Remove remaining hardcoded python version numbers;
      use DEB_PYTHON_COMPILE_VERSION everywhere.
  * debian/control:
    + Break the long depends lists into one depends per line for readability
    + Add libxine1-x dependency (LP: #159338)
    + Bump standards version; no changes needed.
  * debian/watch:
    + Add a shiny new watch file.
  * debian/patches/50_honour_xine_driver.patch
    + Make Miro honour the --xine-driver command line option (Debian: #453406)
  * debian/patches/60_xine_extractor_path.patch
  * debian/miro.install
    + Install xine_extractor into /usr/lib/miro rather than /usr/libexec,
      and make Miro look for it there (Debian: #454603, #451980, #452708,
      #452486)

miro (1.0-1) unstable; urgency=low

  * New upstream release (Closes: #449131, #451207).
    + Fixed malformed miro.xml file (Closes: #445871, #443510).
    + Drop several patches which were applied upstream.
  * Add missing libxv-dev build-dependency (Closes: #442832, #443006, #443045).
  * Miro shipped with a menu file since the beginning (Closes: #443211).
    It's currently in the 'Applications/Network/Web News' category.
  * Fix small typo in German translation (Closes: #451333).
  * Cannot reproduce the following bugs with this release. Please
    reopen if you still experience problems:
    + Miro crashes on play (Closes: #443266).
    + Used to work; now segfaults on startup (Closes: #444484).
      Please try removing the ~/.miro directory if the problem persists.
    + Segfault on startup (quicktime related?) (Closes: #444051).
    + Cannot install Miro (Closes: #443045). Unlikely to be a real bug,
      probably stems from mixing packages from stable/unstable.
  * New 'Recommends: libxine1-ffmpeg'.

miro (0.9.9.1-1) unstable; urgency=low

  * New upstream release (Closes: #433752).
     + Democracy Player was renamed to Miro upstream, so we now
       use Provides/Conflicts/Replaces to transition existing installs.
     + Update the package description (and improve it a bit).
     + Now supports proxy settings (Closes: #426992). Miro uses the
       default GNOME proxy, which you can set/enable using gconf-editor.
  * Update debian/copyright.
  * Several improvements inspired by the Ubuntu version of the package:
    + Remove unneeded RPATH from MozillaBrowser.so (using chrpath).
    + debian/menu: Move package into 'Applications/Network/Web News'.
    + Drop shebang from feedparser.py, not needed (and silences lintian).
    + Only suggest python-psyco on [i386 hurd-i386 netbsd-i386 kfreebsd-i386].
  * miro.desktop improvements:
    + Drop 'Encoding=UTF-8', no longer necessary (lintian).
    + Change categories to 'AudioVideo;FileTransfer;News;P2P;TV;Player;'.
  * Cannot reproduc...

Read more...

Changed in miro:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.