|
99 | 99 | ); |
100 | 100 | $requested_owner = $requested_account->getOwner(); |
101 | 101 | $full_name = $requested_owner->getFirstname() . " " . $requested_owner->getLastname(); |
102 | | - $mail = $requested_owner->getMail(); |
| 102 | + $mail_link = "mailto:" . urlencode($requested_owner->getMail()); |
| 103 | + $mail_display = htmlspecialchars($requested_owner->getMail()); |
103 | 104 | echo "<tr class='pending_request'>"; |
104 | 105 | echo "<td>$full_name</td>"; |
105 | 106 | echo "<td>" . $requested_account->gid . "</td>"; |
106 | | - echo "<td><a href='mailto:$mail'>$mail</a></td>"; |
| 107 | + echo "<td><a href='$mail_link'>$mail_display</a></td>"; |
107 | 108 | echo "<td>" . date("jS F, Y", strtotime($request['timestamp'])) . "</td>"; |
108 | 109 | echo "<td>"; |
109 | 110 | $CSRFTokenHiddenFormInput = UnityHTTPD::getCSRFTokenHiddenFormInput(); |
|
146 | 147 | foreach ($PIGroupGIDs as $gid) { |
147 | 148 | $group = new UnityGroup($gid, $LDAP, $SQL, $MAILER, $WEBHOOK); |
148 | 149 | $owner = $group->getOwner(); |
149 | | - $full_name = $owner->getFirstname() . " " . $owner->getLastname(); |
150 | 150 | if ($USER->uid == $owner->uid) { |
151 | 151 | continue; |
152 | 152 | } |
153 | | - |
| 153 | + $gecos = htmlspecialchars($owner->getFullname()); |
| 154 | + $gid = htmlspecialchars($group->gid); |
| 155 | + $mail_link = "mailto:" . urlencode($owner->getMail()); |
| 156 | + $mail_display = htmlspecialchars($owner->getMail()); |
154 | 157 | echo "<tr class='expandable'>"; |
155 | | - echo "<td><button class='btnExpand'>▶</button>$full_name</td>"; |
156 | | - echo "<td>" . $group->gid . "</td>"; |
157 | | - echo "<td><a href='mailto:" . $owner->getMail() . "'>" . $owner->getMail() . "</a></td>"; |
| 158 | + echo "<td><button class='btnExpand'>▶</button>$gecos</td>"; |
| 159 | + echo "<td>$gid</td>"; |
| 160 | + echo "<td><a href='$mail_link'>$mail_display</a></td>"; |
158 | 161 | $CSRFTokenHiddenFormInput = UnityHTTPD::getCSRFTokenHiddenFormInput(); |
159 | 162 | echo |
160 | 163 | "<td> |
161 | 164 | <form action='' method='POST' |
162 | | - onsubmit='return confirm(\"Are you sure you want to leave the PI group " . $group->gid . "?\")'> |
| 165 | + onsubmit='return confirm(\"Are you sure you want to leave the PI group " . $gid . "?\")'> |
163 | 166 | $CSRFTokenHiddenFormInput |
164 | 167 | <input type='hidden' name='form_type' value='removePIForm'> |
165 | | - <input type='hidden' name='pi' value='" . $group->gid . "'> |
| 168 | + <input type='hidden' name='pi' value='" . $gid . "'> |
166 | 169 | <input type='submit' value='Leave Group'> |
167 | 170 | </form> |
168 | 171 | </td>"; |
|
0 commit comments