MantisBT - ATutor
View Issue Details
0003356ATutorContentpublic2008-04-14 01:472013-05-08 08:48
IndieRect 
cindy 
normalminoralways
closedfixed 
1.6 
1.6.1 
SVN
0003356: Some char pairs break restored content
In our production 1.5.5 installation we found that certain character combinations in content pages cause problems when restoring them from a backup. The content gets truncated at of after them.
The problem was confirmed in a fresh 1.6 pl1.

The pairs we know about are:
1. \0
The restored content is truncated *by the browser (?)* at the last character before the backslash. The reason seems to be as simple as misunderstanding this pair as an ASCII 0.
2. \"
It gets converted into \"" during backup, and the string is truncated *in the DB* at the first comma (,) after this pair. Probably, the comma is mistaken with a beginning of the next CSV column.


Steps to reproduce:
1. Create two content pages containing 'sometext \0 othertext' and 'sometext \" some, othertext'.
2. Create a course backup.
3. Restore content from the backup.
4. The restored pages should be truncated, 'othertext' absent from both. While editing the page, Firefox will handle \0 somehow, but Opera will consider it an EOF.
The bug is reproducible in tests as well (I guess it's the same for any content backed up).

Browsers used: Opera 9.25, Firefox 1.5.
MySQL version: 5.0.22.
PHP version: 5.1.6.
No tags attached.
Issue History
2008-04-14 01:47IndieRectNew Issue
2008-04-14 01:47IndieRectAffects version => SVN
2008-04-30 06:12cindyStatusnew => assigned
2008-04-30 06:12cindyAssigned To => cindy
2008-05-07 06:28cindyStatusassigned => resolved
2008-05-07 06:28cindyFixed in Version => 1.6.1
2008-05-07 06:28cindyResolutionopen => fixed
2008-05-07 06:28cindyNote Added: 0002877
2008-08-21 08:55gregStatusresolved => closed
2013-04-24 20:26user1Note Added: 0006351
2013-04-24 20:55user1Note Added: 0006352
2013-04-24 22:24user1Note Added: 0006353
2013-04-24 22:24user1Note Added: 0006354
2013-04-25 02:04user1Note Added: 0006355
2013-04-25 03:09user1Note Added: 0006356
2013-04-25 03:09user1Note Added: 0006357
2013-04-25 04:16user1Note Added: 0006358
2013-04-25 13:43user1Note Added: 0006359
2013-04-25 14:00user1Note Added: 0006360
2013-04-25 23:35user1Note Added: 0006361
2013-04-29 05:12user1Note Added: 0006368
2013-05-03 13:09user1Note Added: 0006389
2013-05-03 22:23user1Note Added: 0006394
2013-05-04 07:51user1Note Added: 0006398
2013-05-04 18:03user1Note Added: 0006401
2013-05-04 21:14user1Note Added: 0006403
2013-05-05 16:23user1Note Added: 0006405
2013-05-05 18:31user1Note Added: 0006406
2013-05-06 12:48user1Note Added: 0006417
2013-05-06 21:17user1Note Added: 0006422
2013-05-07 02:22user1Note Added: 0006431
2013-05-07 04:41user1Note Added: 0006436
2013-05-07 04:41user1Note Added: 0006437
2013-05-07 06:58user1Note Added: 0006441
2013-05-07 06:58user1Note Added: 0006442
2013-05-08 03:59user1Note Added: 0006455
2013-05-08 08:48user1Note Added: 0006462

Notes
(0002877)
cindy   
2008-05-07 06:28   
Affected scripts:

include/classes/CSVImport.class.php remove replacement from " to ""
include/classes/CSVExport.class.php use ' instead of " when inserting content into table. This way can reduce the special handling on ", change the way of special handling on newline chars \n, \r
(0006351)
user1   
2013-04-24 20:26   
The writer of the show, Ray McKinnon, was somewhat familiar with my case. His late wife, Lisa Blount was a friend of mine. She and I exchanged letters while I was on death row in Arkansas, and she even sang at a concert in Arkansas, along with Eddie Vedder, Patti Smith, and Johnny Depp, to help raise awareness about my plight.I heard that McKinnon also did research into the cases of other men who had been on death row and had been released or exonerated. It paid off. I can tell you from first hand experience that Rectify is a very realistic show. http://ountlouboutinshoe.webs.com/ [^]
(0006352)
user1   
2013-04-24 20:55   
http://www.ocE8ql4V9IOf4ll355H5a2.com/ [^]
GdLkVXAb http://www.ocE8ql4V9IOf4ll355H5a2.com/ [^]
[url=http://www.ocE8ql4V9IOf4ll355H5a2.com/ [^]]GdLkVXAb[/url]
(0006353)
user1   
2013-04-24 22:24   
0003356: Some char pairs break restored content - MantisBT hermes bags http://hermes.me.cc/ [^] http://hermes.me.cc/ [^]
(0006354)
user1   
2013-04-24 22:24   
0003356: Some char pairs break restored content - MantisBT celine bags http://www.celine360.com/ [^] http://www.celine360.com/ [^]
(0006355)
user1   
2013-04-25 02:04   
0003356: Some char pairs break restored content - MantisBT mulberry bags http://mulberry360.over-blog.com/ [^] http://mulberry360.over-blog.com/ [^]
(0006356)
user1   
2013-04-25 03:09   
0003356: Some char pairs break restored content - MantisBT burberry bags http://bags.me.cc/ [^] http://bags.me.cc/ [^]
(0006357)
user1   
2013-04-25 03:09   
0003356: Some char pairs break restored content - MantisBT miu miu http://www.imiumiu.com/ [^] http://www.imiumiu.com/ [^]
(0006358)
user1   
2013-04-25 04:16   
0003356: Some char pairs break restored content - MantisBT seo tools http://scrapebox.overblog.com/ [^] http://scrapebox.overblog.com/ [^]
(0006359)
user1   
2013-04-25 13:43   
I favor these particular diablo 3 gold http://www.diablo3goldfast.com [^] http://www.diablo3goldfast.com [^] can be extremely sweet. Which i attract a good 11 1/2 on the other hand got my diablo 3 gold http://www.diablo3goldfast.com [^] http://www.diablo3goldfast.com [^] in the 8 and squeeze seemed to be suitable. They accompany exactly I truly supply! Leggings, lean trousers, also knitwear. Simply put i neat and sprinkle that company pretty often to ensure they are in the market their utmost. A new better helps to make this seem like you have been truly going for a walk even on a reasoning. The little typically grumble is the fact that flap get started in being different down, thus i bear them inside litter box and yes it seriously makes it possible for. On top of that, you're able to rely the entire group vs a fabulous walls or just at home any time you would not save your boxes. LOVE Some of these! I can hold out to provide a oceanfront diablo 3 gold http://www.diablo3goldfast.com [^] http://www.diablo3goldfast.com [^] Lattice Cardy with regards to Easter =D
(0006360)
user1   
2013-04-25 14:00   
christian louboutin shoes http://www.christianlouboutinuksalet.com/ [^] http://www.christianlouboutinuksalet.com/ [^] won't be able to wait around to weaar them. They are really extremely manner.
(0006361)
user1   
2013-04-25 23:35   
0003356: Some char pairs break restored content - MantisBT sac louis vuitton http://sac360.over-blog.com/ [^] http://sac360.over-blog.com/ [^]
(0006368)
user1   
2013-04-29 05:12   
The bad news? Amazon still isn't a terribly profitable company. After eking out $97 million in profit last quarter, it reported $82 million in net income this time around. There's a reason CEO Jeff Bezos had to reassure investors this month that his company is not, in fact, a charitable organization.And that isn't expected to turn around in the immediate future: Its guidance for the second quarter calls for operating income somewhere between a gain of $10 million and a loss of $340 million. Yes, there's a real possibility Amazon could lose a third of a billion dollars for the quarter. red bottom heels http://www.caldoniasvolleyball.com/red-bottom-heel/ [^] http://www.caldoniasvolleyball.com/red-bottom-heel/ [^]
(0006389)
user1   
2013-05-03 13:09   
Il prossimo Festival di Cannes (15-26 maggio) sarĂ  una vera esplosione di gioia per tutti i cinefili, a giudicare dal parterre di titoli, in Concorso e non, e a un presidente di giuria, Steven Spielberg, che sembra il coronamento del sogno di tutti quelli che sono stati bambini tra la fine dei Settanta e gli inizio degli Ottanta, e non solo, visto che il regista di Cincinnati ancora oggi continua a convincere tutti e a farsi nuovi adepti. Inizio col botto grazie alla proiezione di "The Great Gatsby", fuori concorso, che dal trailer promette una versione originalissima, postmoderna e in 3D del capolavoro di Fitzgerald, grazie all'occhio personalissimo di Baz Luhrmann e a un Leonardo DiCaprio ormai inarrestabile nella sua scalata all'empireo hollywoodiano. louis vuitton pas cher http://lv.caldoniasvolleyball.com/ [^] http://lv.caldoniasvolleyball.com/ [^]
(0006394)
user1   
2013-05-03 22:23   
0003356: Some char pairs break restored content - MantisBT diablo 3 gold http://www.flyd3.com/ [^] http://www.flyd3.com/ [^]
(0006398)
user1   
2013-05-04 07:51   
0003356: Some char pairs break restored content - MantisBT seo tools http://scrapebox.over-blog.com/ [^] http://scrapebox.over-blog.com/ [^]
(0006401)
user1   
2013-05-04 18:03   
0003356: Some char pairs break restored content - MantisBT hermes bags http://www.hermesbags360.com/ [^] http://www.hermesbags360.com/ [^]
(0006403)
user1   
2013-05-04 21:14   
0003356: Some char pairs break restored content - MantisBT louis vuitton bags http://www.lvbags188.com/ [^] http://www.lvbags188.com/ [^]
(0006405)
user1   
2013-05-05 16:23   
0003356: Some char pairs break restored content - MantisBT wow gold http://www.wgtwowgold.com/ [^] http://www.wgtwowgold.com/ [^]
(0006406)
user1   
2013-05-05 18:31   
I seriously like these prada handbags http://www.discounthermesshop.com/prada-handbags-c-7.html [^] http://www.discounthermesshop.com/prada-handbags-c-7.html [^] .Hope this helps anybody interested.
(0006417)
user1   
2013-05-06 12:48   
0003356: Some char pairs break restored content - MantisBT lebron 10 http://nikelebron33.com/ [^] http://nikelebron33.com/ [^]
(0006422)
user1   
2013-05-06 21:17   
0003356: Some char pairs break restored content - MantisBT coach outlet http://coach.me.pn/ [^] http://coach.me.pn/ [^]
(0006431)
user1   
2013-05-07 02:22   
0003356: Some char pairs break restored content - MantisBT mulberry bags http://mulberry360.over-blog.com/tag/Mulberry%20Bags/ [^] http://mulberry360.over-blog.com/tag/Mulberry%20Bags/ [^]
(0006436)
user1   
2013-05-07 04:41   
0003356: Some char pairs break restored content - MantisBT cheap jordans http://jordans.eu.pn/ [^] http://jordans.eu.pn/ [^]
(0006437)
user1   
2013-05-07 04:41   
0003356: Some char pairs break restored content - MantisBT celine bags http://gbester.me.cc/ [^] http://gbester.me.cc/ [^]
(0006441)
user1   
2013-05-07 06:58   
0003356: Some char pairs break restored content - MantisBT ???? http://www.feimeizx.com/index.html [^] http://www.feimeizx.com/index.html [^]
(0006442)
user1   
2013-05-07 06:58   
0003356: Some char pairs break restored content - MantisBT chanel bags http://direttoredinogreco.liberazione.it/chanelbags.html [^] http://direttoredinogreco.liberazione.it/chanelbags.html [^]
(0006455)
user1   
2013-05-08 03:59   
0003356: Some char pairs break restored content - MantisBT prada bags http://prada.com.cool4buy.com/ [^] http://prada.com.cool4buy.com/ [^]
(0006462)
user1   
2013-05-08 08:48   
0003356: Some char pairs break restored content - MantisBT mulberry bags http://mulberry360.over-blog.com/tag/Mulberry%20Bags/ [^] http://mulberry360.over-blog.com/tag/Mulberry%20Bags/ [^]