|
98 | 98 | $WEBHOOK |
99 | 99 | ); |
100 | 100 | $requested_owner = $requested_account->getOwner(); |
101 | | - $full_name = $requested_owner->getFirstname() . " " . $requested_owner->getLastname(); |
| 101 | + $gecos = htmlspecialchars($requested_owner->getFullname()); |
102 | 102 | $mail_link = "mailto:" . urlencode($requested_owner->getMail()); |
103 | 103 | $mail_display = htmlspecialchars($requested_owner->getMail()); |
| 104 | + $gid = htmlspecialchars($requested_account->gid); |
104 | 105 | echo "<tr class='pending_request'>"; |
105 | | - echo "<td>$full_name</td>"; |
| 106 | + echo "<td>$gecos</td>"; |
106 | 107 | echo "<td>" . $requested_account->gid . "</td>"; |
107 | 108 | echo "<td><a href='$mail_link'>$mail_display</a></td>"; |
108 | 109 | echo "<td>" . date("jS F, Y", strtotime($request['timestamp'])) . "</td>"; |
109 | 110 | echo "<td>"; |
110 | 111 | $CSRFTokenHiddenFormInput = UnityHTTPD::getCSRFTokenHiddenFormInput(); |
111 | 112 | echo "<form action='' method='POST' id='cancelPI'> |
112 | 113 | $CSRFTokenHiddenFormInput |
113 | | - <input type='hidden' name='pi' value='{$requested_account->gid}'> |
| 114 | + <input type='hidden' name='pi' value='{$gid}'> |
114 | 115 | <input type='hidden' name='form_type' value='cancelPIForm'> |
115 | 116 | <input name='cancel' style='margin-top: 10px;' type='submit' value='Cancel Request'/> |
116 | 117 | </form>"; |
|
151 | 152 | continue; |
152 | 153 | } |
153 | 154 | $gecos = htmlspecialchars($owner->getFullname()); |
154 | | - $gid = htmlspecialchars($group->gid); |
| 155 | + $gid_escaped = htmlspecialchars($group->gid); |
155 | 156 | $mail_link = "mailto:" . urlencode($owner->getMail()); |
156 | 157 | $mail_display = htmlspecialchars($owner->getMail()); |
157 | 158 | echo "<tr class='expandable'>"; |
158 | 159 | echo "<td><button class='btnExpand'>▶</button>$gecos</td>"; |
159 | | - echo "<td>$gid</td>"; |
| 160 | + echo "<td>$gid_escaped</td>"; |
160 | 161 | echo "<td><a href='$mail_link'>$mail_display</a></td>"; |
161 | 162 | $CSRFTokenHiddenFormInput = UnityHTTPD::getCSRFTokenHiddenFormInput(); |
162 | 163 | echo |
163 | 164 | "<td> |
164 | 165 | <form action='' method='POST' |
165 | | - onsubmit='return confirm(\"Are you sure you want to leave the PI group " . $gid . "?\")'> |
| 166 | + onsubmit='return confirm(\"Are you sure you want to leave the PI group $gid_escaped?\")'> |
166 | 167 | $CSRFTokenHiddenFormInput |
167 | 168 | <input type='hidden' name='form_type' value='removePIForm'> |
168 | | - <input type='hidden' name='pi' value='" . $gid . "'> |
| 169 | + <input type='hidden' name='pi' value='$gid_escaped'> |
169 | 170 | <input type='submit' value='Leave Group'> |
170 | 171 | </form> |
171 | 172 | </td>"; |
|
0 commit comments