<div dir="ltr"><div>Hi</div><div><br></div><div>Thanks for catching the mistake and for the patch.</div><div>I have committed it to all affected branches.</div><div><br></div><div><br></div><div>Cheers</div><div>Best regards</div><div>Muhammad Usama</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 6, 2020 at 1:29 PM sherlockcpp &lt;<a href="mailto:sherlockcpp@foxmail.com">sherlockcpp@foxmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hello,</div><div><br></div><div>In pool_passwd.c:391</div><div>I found the condition “if (tok)” is is always true, Because previous condition has already checked that.</div><div><br></div><div>the code is as follows (the code following dose not seem to be used now, But for security, we&#39;d better fix it)</div><div>---------------------------------</div><div><div><div>383         /* Get backend user */</div><div>384         t = getNextToken(t, &amp;tok);</div><div>385         if (tok)</div><div>386         {</div><div>387             /* check if we also have the password */</div><div>388             char       *pwd;</div><div>389</div><div>390             t = getNextToken(t, &amp;pwd);</div><div>391             if (tok)</div><div>392             {</div><div>393                 pwdMapping-&gt;backendUser.password = pwd;</div><div>394                 pwdMapping-&gt;backendUser.userName = tok;</div><div>395                 pwdMapping-&gt;backendUser.passwordType = get_password_type(pwdMapping-&gt;backendUser.password);</div><div>396                 pwdMapping-&gt;mappedUser = true;</div><div>397             }</div><div>398         }</div><div>399         break;</div></div><div></div></div><div>---------------------------------</div><div><br></div><div>I think the condition that really need to be checked here is ”if (pwd)“.</div><div><br></div><div>Best regards</div>_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</blockquote></div></div>