<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/102157/">http://git.reviewboard.kde.org/r/102157/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 3rd, 2011, 2:27 p.m., <b>Ilia Kats</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/102157/diff/1/?file=30472#file30472line105" style="color: black; font-weight: bold; text-decoration: underline;">libs/ui/security/wepwidget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">WepWidget::WepWidget(KeyFormat format, Knm::Connection * connection, QWidget * parent)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">105</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">d</span><span class="o">-></span><span class="n">ui</span><span class="p">.</span><span class="n">key</span><span class="o">-></span><span class="n">setValidator</span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">asciiValidator</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">That's not quite correct. A key can be either hex or ascii, while a passphrase can be anything, the actual key will be derived from the MD5-sum of the passphrase. So the original regex/validator was correct in that part. However, the regexes here specify ranges in length ({5,13} means the thing before that can be repeated from 5 to 13 times), while a hex key can be either 10 or 26, an ascii key either 5 or 13 characters. I think something like (asciiregex{5}|asciiregex{13}|hexregex{10}|hexregex{26}) will do what we want here. Also, the commented out old code should probably be removed completely.</pre>
 </blockquote>



 <p>On August 6th, 2011, 5:03 p.m., <b>Lamarque Vieira Souza</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think NM includes a similar check in its code. Can you check if you implementation is compatible with NM's?</pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I have check and your tests are equals to NM's, so you just need to fix the 'valid(bool)' signal redefinition and this patch is good to go.</pre>
<br />




<p>- Lamarque Vieira</p>


<br />
<p>On August 7th, 2011, 4:05 p.m., Rajeesh K Nambiar wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Network Management.</div>
<div>By Rajeesh K Nambiar.</div>


<p style="color: grey;"><i>Updated Aug. 7, 2011, 4:05 p.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">WEP key validation (should have only 5 to 13 ASCII characters for Ascii key; and 10 to 26 Hex characters for Hex key) wasn't working. Most of the bits were present, here's a gross hack to make it really work. Only implemented and tested WEP validation, but can be extended for other security types as well.

I'm not sure this could be the best/easiest implementation, spent a night figuring out the right signal/slots :-). If this hack could be refined, please let me know!</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested with WEP Hex and ASCII key validations. "OK" button of connection editor widget is now properly enabled/disabled upon changing key.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>libs/ui/security/eapmethodstack.h <span style="color: grey">(552f5c9)</span></li>

 <li>libs/ui/security/leapauthwidget.h <span style="color: grey">(3c01e1d)</span></li>

 <li>libs/ui/security/nullsecuritywidget.h <span style="color: grey">(dc84fb5)</span></li>

 <li>libs/ui/security/securityleap.h <span style="color: grey">(402a7af)</span></li>

 <li>libs/ui/security/securitywidget.h <span style="color: grey">(c536cf6)</span></li>

 <li>libs/ui/security/wepauthwidget.h <span style="color: grey">(6ff721b)</span></li>

 <li>libs/ui/security/wepwidget.h <span style="color: grey">(e78338c)</span></li>

 <li>libs/ui/security/wepwidget.cpp <span style="color: grey">(f024555)</span></li>

 <li>libs/ui/security/wirelesssecuritysettingwidget.cpp <span style="color: grey">(fbc2c34)</span></li>

 <li>libs/ui/security/wpaauthwidget.h <span style="color: grey">(91e7495)</span></li>

 <li>libs/ui/security/wpapskwidget.h <span style="color: grey">(7077836)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/102157/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>