View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001083 | Main CAcert Website | organisational section | public | 2012-07-11 16:03 | 2013-03-21 07:31 |
Reporter | INOPIAE | Assigned To | BenBE | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 2012 Q3 | ||||
Fixed in Version | 2012 Q4 | ||||
Summary | 0001083: Resize comment field for adding new organisation administrators | ||||
Description | The comment field while adding a new organisation administrator is limited to 20 characters. | ||||
Additional Information | Change line 32 from pages/account/33.php <td class="DataTD"><input type="text" name="comments" size=27 maxlength=20 value=""></td> to <td class="DataTD"><input type="text" name="comments" size=30 value=""></td> | ||||
Tags | No tags attached. | ||||
Reviewed by | NEOatNHNG, BenBE | ||||
Test Instructions | |||||
related to | 0000957 | closed | NEOatNHNG | Resize the comment field on https://secure.cacert.org/account.php?id=27 so more information is visible |
|
Or even better a textarera: Change line 32 from pages/account/33.php <td class="DataTD"><input type="text" name="comments" size=27 maxlength=20 value=""></td> to <td class="DataTD"><textarea name="comments" cols="30" rows="5"></textarea></td></td> I attached to versions to the ticket 33-v1.php for just the length 33-v2.php for replacement with textarea. |
|
33-v1.php (2,655 bytes)
<? /* LibreSSL - CAcert web application Copyright (C) 2004-2008 CAcert Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> <? $query = "select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'"; $row = mysql_fetch_assoc(mysql_query($query)); // Reset session variables regarding OrgAdmin's, present empty form if (array_key_exists('email',$_SESSION['_config'])) $_SESSION['_config']['email']=""; if (array_key_exists('OU',$_SESSION['_config'])) $_SESSION['_config']['OU'] = ""; if (array_key_exists('masteracc',$_SESSION['_config'])) $_SESSION['_config']['masteracc'] = 0; if (array_key_exists('comments',$_SESSION['_config'])) $_SESSION['_config']['comments'] = ""; ?> <form method="post" action="account.php"> <input type="hidden" name="orgid" value="<?=intval($_REQUEST['orgid'])?>"> <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper"> <tr> <td colspan="2" class="title"><? printf(_("New Admin for %s"), ($row['O'])); ?></td> </tr> <tr> <td class="DataTD"><?=_("Email")?>:</td> <td class="DataTD"><input type="text" name="email" value=""></td> </tr> <tr> <td class="DataTD"><?=_("Department")?>:</td> <td class="DataTD"><input type="text" name="OU" value=""></td> </tr> <? if($_SESSION['profile']['orgadmin'] == 1) { ?> <tr> <td class="DataTD"><?=_("Master Account")?>:</td> <td class="DataTD"><select name="masteracc"> <option value="0">No</option> // make default option as of SA telco 2011-08-02 on bug 966 <option value="1">Yes</option> </select></td> </tr> <? } ?> <tr> <td class="DataTD"><?=_("Comments")?>:</td> <td class="DataTD"><input type="text" name="comments" size=30 value=""></td> </tr> <tr> <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Add")?>"></td> </tr> </table> <input type="hidden" name="oldid" value="<?=$id?>"> <input type="hidden" name="csrf" value="<?=make_csrf('orgadmadd')?>" /> </form> |
|
33-v2.php (2,659 bytes)
<? /* LibreSSL - CAcert web application Copyright (C) 2004-2008 CAcert Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> <? $query = "select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'"; $row = mysql_fetch_assoc(mysql_query($query)); // Reset session variables regarding OrgAdmin's, present empty form if (array_key_exists('email',$_SESSION['_config'])) $_SESSION['_config']['email']=""; if (array_key_exists('OU',$_SESSION['_config'])) $_SESSION['_config']['OU'] = ""; if (array_key_exists('masteracc',$_SESSION['_config'])) $_SESSION['_config']['masteracc'] = 0; if (array_key_exists('comments',$_SESSION['_config'])) $_SESSION['_config']['comments'] = ""; ?> <form method="post" action="account.php"> <input type="hidden" name="orgid" value="<?=intval($_REQUEST['orgid'])?>"> <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper"> <tr> <td colspan="2" class="title"><? printf(_("New Admin for %s"), ($row['O'])); ?></td> </tr> <tr> <td class="DataTD"><?=_("Email")?>:</td> <td class="DataTD"><input type="text" name="email" value=""></td> </tr> <tr> <td class="DataTD"><?=_("Department")?>:</td> <td class="DataTD"><input type="text" name="OU" value=""></td> </tr> <? if($_SESSION['profile']['orgadmin'] == 1) { ?> <tr> <td class="DataTD"><?=_("Master Account")?>:</td> <td class="DataTD"><select name="masteracc"> <option value="0">No</option> // make default option as of SA telco 2011-08-02 on bug 966 <option value="1">Yes</option> </select></td> </tr> <? } ?> <tr> <td class="DataTD"><?=_("Comments")?>:</td> <td class="DataTD"><textarea name="comments" cols="30" rows="5"></textarea></td> </tr> <tr> <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Add")?>"></td> </tr> </table> <input type="hidden" name="oldid" value="<?=$id?>"> <input type="hidden" name="csrf" value="<?=make_csrf('orgadmadd')?>" /> </form> |
|
Added a new Org Administrator with a long comment. The comment works. |
|
Change looks OK to me. Needs some more testing. |
|
Change appears good. The comment even if done in seperate lines with line break gets concatenated which is alright and probably intended. Only drawback from the whole code here: If the email address is mistyped all fields become empty and one can restart entering from beginning. But this has nothing to do with the patch itself. |
|
login with Org-Assurer status (Oadmin flag=1) account https://cacert1.it-sls.de/account.php?id=33&orgid=273 Org Admin - View Organisations click "Admin" of one org eg https://cacert1.it-sls.de/account.php?id=32&orgid=273 add new admin https://cacert1.it-sls.de/account.php?id=33&orgid=273 big field comments added special code text and addtl. text all script code stripped out of comment => ok |
|
reviewed by 3, good to go |
|
The fix has been installed on the production server on November 1, 2012. See also: https://lists.cacert.org/wws/arc/cacert-systemlog/2012-11/msg00003.html |
|
More than 3 months solved |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-07-11 16:03 | INOPIAE | New Issue | |
2012-07-11 16:03 | INOPIAE | Relationship added | related to 0000957 |
2012-07-14 10:29 | INOPIAE | Note Added: 0003088 | |
2012-07-14 10:29 | INOPIAE | File Added: 33-v1.php | |
2012-07-14 10:29 | INOPIAE | File Added: 33-v2.php | |
2012-10-28 14:12 | BenBE | Reviewed by | => BenBE |
2012-10-28 14:12 | BenBE | Status | new => needs review & testing |
2012-10-28 14:35 | BenBE | Source_changeset_attached | => cacert-devel testserver 243c7203 |
2012-10-28 14:35 | BenBE | Source_changeset_attached | => cacert-devel testserver 43f6bbc5 |
2012-10-30 21:28 | INOPIAE | Note Added: 0003285 | |
2012-10-30 21:41 | NEOatNHNG | Reviewed by | BenBE => NEOatNHNG, BenBE |
2012-10-30 21:41 | NEOatNHNG | Note Added: 0003287 | |
2012-10-30 21:41 | NEOatNHNG | Status | needs review & testing => needs testing |
2012-10-30 22:46 | alex | Note Added: 0003294 | |
2012-10-30 22:52 | Uli60 | Note Added: 0003296 | |
2012-10-30 22:53 | Uli60 | Note Added: 0003297 | |
2012-10-30 22:53 | Uli60 | Assigned To | => BenBE |
2012-10-30 22:53 | Uli60 | Status | needs testing => ready to deploy |
2012-10-31 18:45 | BenBE | Source_changeset_attached | => cacert-devel release 53b015bf |
2012-11-01 14:03 | wytze | Note Added: 0003314 | |
2012-11-01 14:03 | wytze | Status | ready to deploy => solved? |
2012-11-01 14:03 | wytze | Resolution | open => fixed |
2013-01-13 08:22 | INOPIAE | Fixed in Version | => 2012 Q4 |
2013-03-21 07:31 | Werner Dworak | Note Added: 0003835 | |
2013-03-21 07:31 | Werner Dworak | Status | solved? => closed |
2013-03-21 07:31 | Werner Dworak | Product Version | => 2012 Q3 |