Mantis

Discovered issue I have with the import/export plugin

Posted by swingkid 
Discovered issue I have with the import/export plugin
May 30, 2009 12:00AM
In some of the issues I'm trying to import the issues of quotes in the text.
such as "

This seems to truncate the value up to but not including the quote.

For example if the text I have
is
abcde"123

What would get saved is
abcde

Everything after and including the quote gets truncated.
Also even having escaped version of the qutoe does not seem to help (ie." " or &quotwinking smiley
A non programmatic workaround is to use single quotes.
However, note that when I cut and paste in an issue into mantis, the double quotes appears to be preserved
so it appears to be a translation issue with the plugin.
Re: Discovered issue I have with the import/export plugin
May 30, 2009 11:03PM
Well,

I discovered the problem after tracing the path through using NetBeans the problem
is that the code appears to be passing the values to an issue through URL strings and the values
are not URL encoded.

I made these slight modifications to the code.
plugins/importexport/core/print_api.php
modified line 236 of urlencode to see if that helps with the problem.
echo &#039;<input type="hidden" name="&#039; . $t_key . &#039;_&#039; . $i . &#039;" value="&#039; . urlencode($t_value) . &#039;" />&#039; . "\n";

core/gpc_api.php
modified line 74 added urldecode to return of $t_result
return urldecode($t_result);

I also had to increase my
max_execution_time = 60
; Maximum execution time of each script, in seconds
as it appears that it now takes noticeably longer to process issues.

I suspect there is a more efficient elegant way to handle this. But for anyone having problems
importing it issues in the description where they use double quotes this may solve the problems that
I was experiencing.

In general, I believe passing information through URL strings should be URL encoded as a general best practice.

I&#039;ve also entered in an issue into the Mantis bug tree since my fix/hack required a change there. [www.mantisbt.org]



Edited 2 time(s). Last edit at 08/22/2009 12:13AM by swingkid.
Sorry, only registered users may post in this forum.

Click here to login



Online Users

Guests: 7
Record Number of Users: 1 on April 02, 2023
Record Number of Guests: 115 on November 09, 2023
Top Users
Hébergeur : Morinie.Fr