[Xerte-dev] Re: FW: Further Xerte Data Loss

Smith, John J.J.Smith at gcu.ac.uk
Mon May 12 15:23:38 BST 2014


The only check on the incoming data is this:

if(strlen($_POST['filedata'])!=strlen($_POST['filesize']))

Since both are coming from the Flash then it's possible that they could still match and the data could be corrupt...

I'd say a quick check of whether the end of the data ="</learningObject>" would be better than nothing to catch truncated files...

Regards,

John Smith | Learning Technologist
Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University
Cowcaddens Road | Glasgow | G4 0BA

Please address ALL support requests to hlsblt at gcu.ac.uk where one of the School Learning Technologists will pick up the job. This will ensure that all jobs are completed as promptly as possible.
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk [xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat L (pgogy) [xerte at pgogywebstuff.com]
Sent: 12 May 2014 14:58
To: For Xerte technical developers
Subject: [Xerte-dev] Re: FW: Further Xerte Data Loss

i thought there was a valid XML test before saving?


On Mon, May 12, 2014 at 2:36 PM, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
I asked if I could share the files, but not had a response: I'm sure it's OK, but I need to check,

-----Original Message-----
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of David Goodwin
Sent: 12 May 2014 14:35
To: For Xerte technical developers
Subject: [Xerte-dev] Re: FW: Further Xerte Data Loss

Can you attach / share the data.xml file somehow?

I know of a PHP library which is quite good at cleaning up such stuff ....

David.


On 12/05/14 13:23, Julian Tenney wrote:
> This looks suspicious: that's not escaping, right? That looks to me
> like errant characters creeping in from somewhere? Paste from word, etc?
>
> -----Original Message-----
> From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of David
> Goodwin
> Sent: 12 May 2014 12:53
> To: For Xerte technical developers
> Subject: [Xerte-dev] Re: FW: Further Xerte Data Loss
>
> On 12/05/14 12:41, Julian Tenney wrote:
>
>  > What beats me is why the file should break halfway through a tag name.
>
> What I've seen is that the PHP (or whatever) can't read the XML file
> as it has the wrong encoding specified, or it just somehow contains
> characters that are invalid.
>
> see e.g.
>
> http://stackoverflow.com/questions/14463573/php-simplexml-load-file-in
> valid-character-error
>
> https://chrismckee.co.uk/saving-user-content-to-xml-error-contains-non
> e-utf-8-content-aka-how-to-remove-invalid-characters-in-utf-8/
>
> David.
>
>  >
>
>  > -----Original Message-----
>
>  > From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
> <mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>>
>
>  > [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of
> David
>
>  > Goodwin
>
>  > Sent: 12 May 2014 12:37
>
>  > To: For Xerte technical developers
>
>  > Subject: [Xerte-dev] Re: FW: Further Xerte Data Loss
>
>  >
>
>  > Is it possible that it's a unicode ` character?
>
>  >
>
>  >
>
>  > I've seen a number of UTF-8 related issues with the data.xml etc files.
>
>  >
>
>  > David.
>
>  >
>
> --
>
> Pale Purple Ltd
>
> PHP Web application development and support
>
> http://www.palepurple.co.uk
>
> @PalePurpleLtd
>
> 07792 380669 / 0845 0046746
>
> _______________________________________________
>
> Xerte-dev mailing list
>
> Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
> <mailto:Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>>
>
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>

--
Pale Purple Ltd

PHP Web application development and support

http://www.palepurple.co.uk
@PalePurpleLtd
07792 380669 / 0845 0046746

_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.





Glasgow Caledonian University is a registered Scottish charity, number SC021474



More information about the Xerte-dev mailing list