fix: [UI] Warning when fetching PGP key

pull/8398/head
Jakub Onderka 2022-05-22 19:58:07 +02:00
parent 970aedcbf2
commit 073bc4f74c
2 changed files with 5 additions and 5 deletions

View File

@ -2331,6 +2331,7 @@ class UsersController extends AppController
public function searchGpgKey($email = false)
{
session_abort();
if (!$email) {
throw new NotFoundException('No email provided.');
}
@ -2339,7 +2340,6 @@ class UsersController extends AppController
throw new NotFoundException('No keys found for given email at keyserver.');
}
$this->set('keys', $keys);
$this->autorender = false;
$this->layout = false;
$this->render('ajax/fetchpgpkey');
}

View File

@ -4,7 +4,7 @@
<?php echo __("Do not blindly trust fetched keys and check the fingerprint from other source.") ?>
<a href="https://evil32.com" rel="noreferrer noopener" target="_blank"><?php echo __("And do not check just Key ID, but whole fingerprint.") ?></a>
</p>
<div class="popover_choice_main" id ="popover_choice_main">
<div class="popover_choice_main" id="popover_choice_main">
<table style="width:100%;">
<tr>
<th style="padding-left:10px; text-align:left;"><?php echo __('Key ID');?></th>
@ -16,14 +16,14 @@
<td role="button" tabindex="0" aria-label="<?php echo __('Select PGP key');?>" style="padding-left:10px; text-align:left;width:20%;" title="<?php echo h($key['fingerprint']); ?>"><?php echo h($key['key_id']); ?></td>
<td style="text-align:left;width:20%;" title="<?php echo h($key['fingerprint']); ?>"><?php echo h($key['date']); ?></td>
<td style="padding-right:10px; text-align:left;width:60%;" title="<?php echo h($key['fingerprint']); ?>">
<b><?php echo h(chunk_split($key['fingerprint'], 4, ' ')); ?></b><br />
<?php echo nl2br(h($key['address'])); ?>
<b><?php echo h(chunk_split($key['fingerprint'], 4, ' ')); ?></b><br>
<?= isset($key['address']) ? nl2br(h($key['address']), false) : ''; ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<div role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" class="templateChoiceButton templateChoiceButtonLast" onClick="cancelPopoverForm();"><?php echo __('Cancel');?></div>
<div role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" class="templateChoiceButton templateChoiceButtonLast" onclick="cancelPopoverForm();"><?php echo __('Cancel');?></div>
</div>
<script type="text/javascript">
$(function() {