fixes previous commit

pull/61/head
Christophe Vandeplas 2012-05-21 13:41:04 +02:00
parent 04ffe374a1
commit c713d6498f
1 changed files with 9 additions and 6 deletions

View File

@ -108,12 +108,15 @@
<td class="short"><?php echo $attribute['type'];?></td>
<td><?php
$sig_display = nl2br(Sanitize::html($attribute['value']));
if('attachment' == $attribute['type'] ||
'malware-sample' == $attribute['type'] ||
strpos('|', $attribute['type']) === false) {
$filename_hash = explode('|', Sanitize::html($attribute['value']));
echo $this->Html->link($filename_hash[0], array('controller' => 'attributes', 'action' => 'download', $attribute['id']));
if (isset($filename_hash[1])) echo ' | '.$filename_hash[1];
if('attachment' == $attribute['type'] ||
'malware-sample' == $attribute['type'] ) {
$filename_hash = explode('|', Sanitize::html($attribute['value']));
echo $this->Html->link($filename_hash[0], array('controller' => 'attributes', 'action' => 'download', $attribute['id']));
if (isset($filename_hash[1])) echo ' | '.$filename_hash[1];
} elseif (strpos($attribute['type'], '|') !== false) {
$filename_hash = explode('|', Sanitize::html($attribute['value']));
echo $filename_hash[0];
if (isset($filename_hash[1])) echo ' | '.$filename_hash[1];
} elseif ('vulnerability' == $attribute['type']) {
echo $this->Html->link($sig_display, 'http://www.google.com/search?q='.$sig_display, array('target'=> '_blank'));
} else {