bugganesha - Bugs: bug #9119, Bug SQL lors de l'envoi d'un...

 
 

bug #9119: Bug SQL lors de l'envoi d'un accusé de récéption contenant des apostrophes (+correction)

Submitted by:  Pierre Gosset <pyg>
Submitted on:  Wed 26 May 2004 07:49:54 PM UTC  
 
Category: Outils : MessagerieSeverity: 2 - Minor
Item Group: NoneRelease: 
Status: FixedPrivacy: Public
Assigned to: Georges Caldeira <georges>Percent Complete: 100%
Originator Name: StéphaneOpen/Closed: Closed
URL: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 27 May 2004 07:51:55 AM UTC, comment #1:

Correction dans GaneshaSP1B5

Georges Caldeira <georges>
Project AdministratorIn charge of this item.
Wed 26 May 2004 07:49:54 PM UTC, original submission:

Vu sur http://www.anemalab.org/phorum/read.php?f=2&i=7968&t=7964

"J'ai juste un problème au moment ou je consulte les messages provenant du tuteur.
Quand je clique sur l'icone de gauche(avec des p'tites lunettes) à coté du message, j'ai l'erreur suivante :

Database error: Invalid SQL: INSERT INTO mes_rec (source,dest,objet,text,date,lu,groupe,fichier,ar,type) values (2,13,'Réponse accusé de réception','Le message : ok ca é)àç_è-'(''";:,! A été lu par STAGIAIRE1 STAGIAIRE1','26/05/04 00:10:34',0,1,'',0,0)
MySQL Error: 1064 (You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(''";:,! A été lu par STAGIAIRE1 STAGIAIRE1','26/05/04 00:10:)
Ganesha halted."

Correction proposée :
dans /ganesha/class/webmail.class.php
Dans la fonction SendAR() [ligne 270 environ] :
$lmsg = sprintf($st_texte['accuserecept'],Replace($msg));
est à remplacer par :
$lmsg = sprintf($st_texte['accuserecept'],addslashes(Replace($msg)));

Pierre Gosset <pyg>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 27 May 2004 07:51:55 AM UTCgeorgesStatusNone=>Fixed
  Percent Complete0%=>100%
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1