Bug #2709

Single photo upload with Arabic title fails to publish

Added by baghdadbrian about 4 years ago. Updated almost 4 years ago.

Status:NewStart date:12/05/2013
Priority:UrgentDue date:
Assignee:vitriolix% Done:

0%

Category:-
Target version:Beta 4
Component:

Description

See these two single photo stories:

http://storymaker.cc/%d9%88%d8%b1%d8%b4%d8%a9-%d8%aa%d8%af%d8%b1%d9%8a%d8%a8-%d9%85%d8%af%d8%b1%d8%a8%d9%8a%d9%86/

and

http://storymaker.cc/tunisia-tot/

They are published from the SAME project. This project is being published from an Xperia Go. The only difference is in the first example the title of the project is written in Arabic, and in the second it is written in English. I assume this is a problem with interaction between storymaker app and storymaker.cc but I'm not sure.

This problem DOES NOT appear when posting a video, see: http://storymaker.cc/%d9%88%d8%b1%d8%b4%d8%a9-%d8%aa%d8%af%d8%b1%d9%8a%d8%a8-%d9%85%d8%af%d8%b1%d8%a8%d9%8a%d9%86-%d8%a8%d8%aa%d9%88%d9%86%d8%b3/ (posted from the same device as the photo upload failures)

post.PNG - photo link as stored in the post data (16 KB) KevinH, 01/22/2014 06:52 pm

file.PNG - photo filename as stored on the server (13.8 KB) KevinH, 01/22/2014 06:52 pm

web.PNG - photo link as requested by the browser (7.13 KB) KevinH, 01/22/2014 06:52 pm


Related issues

Copied to StoryMaker™ - Bug #8449: Single photo upload with Arabic title fails to publish New 12/05/2013

History

#1 Updated by KevinH almost 4 years ago

Wordpress uses formatting.php as a filter as part of its data sanitization on all posts. Non-latin characters within post html are run through htmlentities as an exploit mitigation. This is by design. When a photo is uploaded from within wordpress, the wordpress media uploader will apply this filer on the filename to prevent a mismatch between the physical file name and how it is presented to the end user by wordpress. Since Storymaker bypasses the media uploader and inserts the photo as a link this filter is not run, so the filename presented in the browser link is html encoded but the physical file is not. See attached images for an example.

To resolve this, simply htmlencode the filename before uploading to storymaker or strip non-latin character from the files name as they are not currently supported. It appears like this is at least partly being done already (I am guessing the photo filename is a combination of several field values and at least one of these values is not being sanitized).

Also available in: Atom PDF