https://bugs.contribs.org/show_bug.cgi?id=10622

John Crisp <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from John Crisp <[email protected]> ---
I don't mind doing a patch for this at least.

As far as I can see the issues are here. I have added what I think are the
right replacements - can someone have a look at see if this looks about right?

   211  function CAdb_to_array($search = '.*') {
   212          global $config;
   213  
   214          # Prepend a default status to search string if missing.
   215          if (! ereg('^\^\[.*\]', $search)) $search = '^[VRE].*'.$search;

if (! preg_match('^\^\[.*\]', $search)) $search = '^[VRE].*'.$search;

   216  
   217          # Include valid certs?
   218          if (ereg('^\^\[.*V.*\]',$search)) $inclval = true;

if (preg_match('^\^\[.*V.*\]',$search)) $inclval = true;

   219          # Include revoked certs?
   220          if (ereg('^\^\[.*R.*\]',$search)) $inclrev = true;

if (preg_match('^\^\[.*R.*\]',$search)) $inclrev = true;

   221          # Include expired certs?
   222          if (ereg('^\^\[.*E.*\]',$search)) $inclexp = true;

if (preg_match('^\^\[.*E.*\]',$search)) $inclexp = true;   

   223  
   224          # There isn't really a status of 'E' in the openssl index.
   225          # Change (E)xpired to (V)alid within the search string.
   226          $search = ereg_replace('^(\^\[.*)E(.*\])','\\1V\\2',$search);

$search = preg_replace('^(\^\[.*)E(.*\])','\\1V\\2',$search);

   227  
   228          $db = array();
   229          exec('egrep -i '.escshellarg($search).' '.$config['index'],
$x);
   230          foreach($x as $y) {
   231                  $i = CAdb_explode_entry($y);
   232                  if (($i['status'] == "Valid" && $inclval) ||
($i['status'] == "Revoked" && $inclrev) || ($i['status'] == "Expired" &&
$inclexp))
   233                          $db[$i['serial']] = $i;
   234          }
   235  
   236          return($db);
   237  }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/

Reply via email to