<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 5, 2013 at 7:45 AM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 2013-05-04 10:54, Isaac Bennetch a écrit :<br>
<div class="im">> Hi,<br>
><br>
> Can I get some thoughts on [1]? The way the code exists currently, you<br>
> can insert bad data (you'll get a standard MySQL warning after the<br>
> insert). For example, inserting the output of the MD5() function in to a<br>
> TINYINT column. This pull request implements the AES_ENCRYPT function,<br>
> but silently fails to show the salt form field in the event the user<br>
> tries to insert to an invalid column type...so it looks broken in the<br>
> case the user is trying to do something that's a bad idea.<br>
><br>
> In keeping with the current system, I thought it should always show the<br>
> salt field and proceed with the insert regardless of the column type,<br>
> however that isn't the most user-friendly idea. To keep users most<br>
> happy, I wondered if we should implement some sanity checks for some<br>
> column types and show an inline warning as needed (similar to the<br>
> recently merged warning when creating a new user with the same<br>
> username). Some of the functions require or suggest certain column types<br>
> which we could easily check, but I'm not sure it's phpMyAdmin's<br>
> responsibility to constantly warn the user in this case.<br>
<br>
</div>I added a comment in the pull request. I also asked Garvin about this,<br>
let's wait for his insight.<br>
<div class="im"><br>
><br>
> Regardless, the question at hand is whether this pull request can be<br>
> merged as-is or if we should change the behavior in the case of an<br>
> invalid column type.<br>
<br>
</div>If it works well for the correct column type, please merge.<br>
<div class="im"></div></blockquote><div><br></div><div>My preference would be to change the behavior of the patch before merging. I would prefer to see a small inline popup when attempting to insert potentially invalid data, a second option I do not mind is simply inserting the data and showing the MySQL warning about truncated data on the results page (the current behavior for all functions except for this patch). The least desirable behavior, which is implemented by this patch, is to silently refuse to do anything on the insert page (in this patch, AES_ENCRYPT requires a salt value which is prompted when selecting the AES_ENCRYPT function; however if the column type is not valid for AES_ENCRYPT data, the salt field silently fails to appear, which I thought was a bug in the implementation).<br>
<br></div><div>I think for now I'll simply ask for the salt field to always appear (matching current behavior), if we reach a decision about handling known-invalid function/column combinations we can create a feature request and move forward.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">><br>
> Thanks!<br>
> 1 - <a href="https://github.com/phpmyadmin/phpmyadmin/pull/290#issuecomment-17281963" target="_blank">https://github.com/phpmyadmin/phpmyadmin/pull/290#issuecomment-17281963</a><br>
<br>
<br>
<br>
</div>--<br>
Marc Delisle<br>
<a href="http://infomarc.info" target="_blank">http://infomarc.info</a><br>
<br>
------------------------------------------------------------------------------<br>
Get 100% visibility into Java/.NET code with AppDynamics Lite<br>
It's a free troubleshooting tool designed for production<br>
Get down to code-level detail for bottlenecks, with <2% overhead.<br>
Download for free and get started troubleshooting in minutes.<br>
<a href="http://p.sf.net/sfu/appdyn_d2d_ap2" target="_blank">http://p.sf.net/sfu/appdyn_d2d_ap2</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</blockquote></div><br></div></div>