$OpenBSD: patch-editor_inc_php,v 1.1 2011/09/27 11:15:00 sthen Exp $ Restrict editor to .conf files --- editor.inc.php.orig Fri Feb 18 22:20:48 2011 +++ editor.inc.php Fri Feb 18 22:22:17 2011 @@ -90,7 +90,7 @@ function show_editor_startpage() $realfile=$mapdir . DIRECTORY_SEPARATOR . $file; $note = ""; - if ( (is_file($realfile)) && (is_readable($realfile)) && (!preg_match("/^\./",$file) ) ) { + if ( (is_file($realfile)) && (is_readable($realfile)) && (!preg_match("/^\./",$file)) && (preg_match("/\.conf$/",$file)) ) { if (!is_writable($realfile)) { $note .= "(read-only)"; }