https://bugzilla.wikimedia.org/show_bug.cgi?id=41090

       Web browser: ---
             Bug #: 41090
           Summary: upgradeRow() constantly triggered for invalid SVG and
                    DjVu files
           Product: MediaWiki
           Version: 1.21-git
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: File management
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


MediaHandler::isMetadataInvalid() should return METADATA_BAD only when there is
something wrong with the metadata, not when there is something wrong with the
file. A file validation error should never cause isMetadataValid() to return
false, since this causes upgradeRow() to be called every time the image is used
in any way.

The SVG and DjVu handlers get this wrong. This causes high DB master load, and
also errors such as bug 27639.

I would humbly point to OggHandler as a possible model for appropriate handling
of invalid files: an invalid file causes an error message to be saved into the
metadata array, and then getLongDesc() is overridden to display the error
message to the user on the image description page. getWidth() etc. returns zero
for an invalid file.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to