- Timestamp:
- 2007/07/20 15:58:59 (17 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update
-
Property
svn:ignore
set to
.cache
.settings
.projectOptions
-
Property
svn:ignore
set to
-
branches/feature-module-update/data/downloads/module/security/security.php
r13402 r15078 8 8 */ 9 9 10 // ¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹10 //ページ管理クラス 11 11 class LC_Page { 12 // ¥³¥ó¥¹¥È¥é¥¯¥¿12 //コンストラクタ 13 13 function LC_Page() { 14 // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È¤Î»ØÄê14 //メインテンプレートの指定 15 15 $this->tpl_mainpage = MODULE_PATH . 'security/security.tpl'; 16 $this->tpl_subtitle = ' ¥»¥¥å¥ê¥Æ¥£¥Á¥§¥Ã¥¯';16 $this->tpl_subtitle = 'セキュリティチェック'; 17 17 } 18 18 } … … 24 24 case 'edit': 25 25 $inst_inc = DATA_PATH . 'install.php'; 26 // install.php ¤Î±£ÊÃ26 // install.phpの隠蔽 27 27 $hidden_inc = MODULE_PATH . 'security/install_inc.php'; 28 28 if(sfIsNormalInstallInc()) { … … 51 51 $objPage->arrList = $arrList; 52 52 53 $objView->assignobj($objPage); // ÊÑ¿ô¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¥¢¥µ¥¤¥ó¤¹¤ë54 $objView->display($objPage->tpl_mainpage); // ¥Æ¥ó¥×¥ì¡¼¥È¤Î½ÐÎÏ53 $objView->assignobj($objPage); //変数をテンプレートにアサインする 54 $objView->display($objPage->tpl_mainpage); //テンプレートの出力 55 55 //------------------------------------------------------------------------------------------------------- 56 // ÀßÄê¥Õ¥¡¥¤¥ë(data)¤Î¥Ñ¥¹¤¬¸ø³«¥Ñ¥¹¤Ç¤Ê¤¤¤«³Îǧ¤¹¤ë56 // 設定ファイル(data)のパスが公開パスでないか確認する 57 57 function sfCheckOpenData() { 58 // ¥É¥¥å¥á¥ó¥È¥ë¡¼¥È¤Î¥Ñ¥¹¤ò¿ä¬¤¹¤ë¡£58 // ドキュメントルートのパスを推測する。 59 59 $doc_root = ereg_replace(URL_DIR . "$","/",HTML_PATH); 60 60 $data_path = realpath(DATA_PATH); 61 61 62 // data ¤Î¥Ñ¥¹¤¬¥É¥¥å¥á¥ó¥È¥ë¡¼¥È°Ê²¼¤Ë¤¢¤ë¤«È½Äê62 // dataのパスがドキュメントルート以下にあるか判定 63 63 if(ereg("^".$doc_root, $data_path)) { 64 $arrResult['result'] = " ¡ß";65 $arrResult['detail'] = " ÀßÄê¥Õ¥¡¥¤¥ë¤¬¡¢¸ø³«¤µ¤ì¤Æ¤¤¤ë²ÄǽÀ¤¬¤¢¤ê¤Þ¤¹¡£<br>";66 $arrResult['detail'].= "/data/ ¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢Èó¸ø³«¤Î¥Ñ¥¹¤ËÀßÃÖ¤·¤Æ²¼¤µ¤¤¡£";64 $arrResult['result'] = "×"; 65 $arrResult['detail'] = "設定ファイルが、公開されている可能性があります。<br>"; 66 $arrResult['detail'].= "/data/ディレクトリは、非公開のパスに設置して下さい。"; 67 67 } else { 68 $arrResult['result'] = " ¡û";69 $arrResult['detail'] = " ÀßÄê¥Õ¥¡¥¤¥ë¤Ï¡¢¸ø³«¥Ñ¥¹ÇÛ²¼¤Ë¸ºß¤·¤Þ¤»¤ó¡£";68 $arrResult['result'] = "○"; 69 $arrResult['detail'] = "設定ファイルは、公開パス配下に存在しません。"; 70 70 } 71 71 72 $arrResult['title'] = " ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÊݸ¥Ñ¥¹";72 $arrResult['title'] = "設定ファイルの保存パス"; 73 73 return $arrResult; 74 74 } 75 75 76 // ¥¤¥ó¥¹¥È¡¼¥ë¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¤«³Îǧ¤¹¤ë76 // インストールファイルが存在するか確認する 77 77 function sfCheckInstall() { 78 // ¥¤¥ó¥¹¥È¡¼¥ë¥Õ¥¡¥¤¥ë¤Î¸ºß¥Á¥§¥Ã¥¯78 // インストールファイルの存在チェック 79 79 $inst_path = HTML_PATH . "install/index.php"; 80 80 81 81 if(file_exists($inst_path)) { 82 $arrResult['result'] = " ¡ß";83 $arrResult['detail'] = "/install/index.php ¤Ï¡¢¥¤¥ó¥¹¥È¡¼¥ë´°Î»¸å¤Ë¥Õ¥¡¥¤¥ë¤òºï½ü¤·¤Æ¤¯¤À¤µ¤¤¡£";82 $arrResult['result'] = "×"; 83 $arrResult['detail'] = "/install/index.phpは、インストール完了後にファイルを削除してください。"; 84 84 } else { 85 $arrResult['result'] = " ¡û";86 $arrResult['detail'] = "/install/index.php ¤Ï¡¢¸«¤Ä¤«¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£";85 $arrResult['result'] = "○"; 86 $arrResult['detail'] = "/install/index.phpは、見つかりませんでした。"; 87 87 } 88 88 89 $arrResult['title'] = " ¥¤¥ó¥¹¥È¡¼¥ë¥Õ¥¡¥¤¥ë¤Î¥Á¥§¥Ã¥¯";89 $arrResult['title'] = "インストールファイルのチェック"; 90 90 return $arrResult; 91 91 } 92 92 93 // ´ÉÍý¼Ô¥æ¡¼¥¶¤ÎID/¥Ñ¥¹¥ï¡¼¥É¥Á¥§¥Ã¥¯93 // 管理者ユーザのID/パスワードチェック 94 94 function sfCheckIDPass($user, $password) { 95 95 $objQuery = new SC_Query(); 96 96 $sql = "SELECT password FROM dtb_member WHERE login_id = ? AND del_flg = 0"; 97 // DB ¤«¤é°Å¹æ²½¥Ñ¥¹¥ï¡¼¥É¤ò¼èÆÀ¤¹¤ë¡£97 // DBから暗号化パスワードを取得する。 98 98 $arrRet = $objQuery->getAll($sql, array($user)); 99 // ¥æ¡¼¥¶ÆþÎϥѥ¹¥ï¡¼¥É¤ÎȽÄê99 // ユーザ入力パスワードの判定 100 100 $ret = sha1($password . ":" . AUTH_MAGIC); 101 101 102 102 if($ret == $arrRet[0]['password']) { 103 $arrResult['result'] = " ¡ß";104 $arrResult['detail'] = " Èó¾ï¤Ë¿ä¬¤Î¤·¤ä¤¹¤¤´ÉÍý¼ÔID¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¸Ä¿Í¾ðÊóϳ±Ì¤Î´í¸±À¤¬¤¢¤ê¤Þ¤¹¡£";103 $arrResult['result'] = "×"; 104 $arrResult['detail'] = "非常に推測のしやすい管理者IDとなっています。個人情報漏洩の危険性があります。"; 105 105 } else { 106 106 if(count($arrRet) > 0) { 107 $arrResult['result'] = " ¢¤";108 $arrResult['detail'] = " ´ÉÍý¼Ô̾¤Ë¡Öadmin¡×¤òÍøÍѤ·¤Ê¤¤¤è¤¦¤Ë¤·¤Æ²¼¤µ¤¤¡£";107 $arrResult['result'] = "△"; 108 $arrResult['detail'] = "管理者名に「admin」を利用しないようにして下さい。"; 109 109 } else { 110 $arrResult['result'] = " ¡û";111 $arrResult['detail'] = " Æȼ«¤ÎID¡¢¥Ñ¥¹¥ï¡¼¥É¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£";110 $arrResult['result'] = "○"; 111 $arrResult['detail'] = "独自のID、パスワードが設定されているようです。"; 112 112 } 113 113 } 114 114 115 $arrResult['title'] = "ID/ ¥Ñ¥¹¥ï¡¼¥É¤Î¥Á¥§¥Ã¥¯";115 $arrResult['title'] = "ID/パスワードのチェック"; 116 116 return $arrResult; 117 117 } 118 118 119 119 120 // install.php ¤Î¥Õ¥¡¥¤¥ë¤ò¥Á¥§¥Ã¥¯¤¹¤ë120 // install.phpのファイルをチェックする 121 121 function sfCheckInstallInc() { 122 // install.php ¤¬±£Êøå¤Î¤â¤Î¤«È½Äꤹ¤ë122 // install.phpが隠蔽後のものか判定する 123 123 if(sfIsNormalInstallInc()) { 124 $arrResult['result'] = " ¡ß";125 $arrResult['detail'] = "install.php ¤ò´Êñ¤Ëɽ¼¨¤Ç¤¤Ê¤¯¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ÆâÍƤò±£Êä·¤Þ¤¹¤«¡©";126 $arrResult['detail'].= "<input type='submit' value=' ±£Ê乤ë'>";124 $arrResult['result'] = "×"; 125 $arrResult['detail'] = "install.phpを簡単に表示できなくすることができます。内容を隠蔽しますか?"; 126 $arrResult['detail'].= "<input type='submit' value='隠蔽する'>"; 127 127 } else { 128 $arrResult['result'] = " ¡û";129 $arrResult['detail'] = "install.php ¤Î±£ÊÃÂкö¤¬¤È¤é¤ì¤Æ¤¤¤Þ¤¹¡£";128 $arrResult['result'] = "○"; 129 $arrResult['detail'] = "install.phpの隠蔽対策がとられています。"; 130 130 } 131 $arrResult['title'] = "install.php ¤Î²ÄÆÉÀ¥Á¥§¥Ã¥¯";131 $arrResult['title'] = "install.phpの可読性チェック"; 132 132 return $arrResult; 133 133 } 134 134 135 // install.php ¤¬±£Êøå¤Î¤â¤Î¤«È½Äꤹ¤ë135 // install.phpが隠蔽後のものか判定する 136 136 function sfIsNormalInstallInc() { 137 // install.php ¤Î¥Ñ¥¹¤ò¼èÆÀ¤¹¤ë137 // install.phpのパスを取得する 138 138 $inst_inc = DATA_PATH . 'install.php'; 139 139 if(file_exists($inst_inc)) { -
branches/feature-module-update/data/downloads/module/security/security.tpl
r12157 r15078 6 6 */ 7 7 *}--> 8 <!-- ¡¡-->8 <!-- --> 9 9 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 10 10 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> … … 35 35 36 36 <div align="center"> 37 <!-- ¡ú¡ú¡ú¥á¥¤¥ó¥³¥ó¥Æ¥ó¥Ä¡ú¡ú¡ú-->37 <!--★★★メインコンテンツ★★★--> 38 38 <table width="500" border="0" cellspacing="0" cellpadding="0" summary=" "> 39 39 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI|escape}-->"> … … 41 41 <tr valign="top"> 42 42 <td class="mainbg"> 43 <!-- ¢§ÅÐÏ¿¥Æ¡¼¥Ö¥ë¤³¤³¤«¤é-->43 <!--▼登録テーブルここから--> 44 44 <table width="500" border="0" cellspacing="0" cellpadding="0" summary=" "> 45 <!-- ¥á¥¤¥ó¥¨¥ê¥¢-->45 <!--メインエリア--> 46 46 <tr> 47 47 <td align="center"> … … 60 60 <tr> 61 61 <td background="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_left_bg.gif"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_left.gif" width="22" height="12" alt=""></td> 62 <td bgcolor="#636469" width="402" class="fs14n"><span class="white"><!-- ¥³¥ó¥Æ¥ó¥Ä¥¿¥¤¥È¥ë--><!--{$tpl_subtitle}--></span></td>62 <td bgcolor="#636469" width="402" class="fs14n"><span class="white"><!--コンテンツタイトル--><!--{$tpl_subtitle}--></span></td> 63 63 <td background="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_right_bg.gif"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="18" height="1" alt=""></td> 64 64 </tr> … … 73 73 <table width="442" border="0" cellspacing="1" cellpadding="5" summary=" "> 74 74 <tr bgcolor="#f2f1ec" align="center" class="fs12n"> 75 <td width="120"> ¥Á¥§¥Ã¥¯ÆâÍÆ</td>76 <td width="40"> ·ë²Ì</td>77 <td width="300"> ¾ÜºÙ</td>75 <td width="120">チェック内容</td> 76 <td width="40">結果</td> 77 <td width="300">詳細</td> 78 78 </tr> 79 79 <!--{section name=i loop=$arrList}--> … … 97 97 </td> 98 98 </tr> 99 <!-- ¥á¥¤¥ó¥¨¥ê¥¢-->99 <!--メインエリア--> 100 100 </table> 101 <!-- ¢¥ÅÐÏ¿¥Æ¡¼¥Ö¥ë¤³¤³¤Þ¤Ç-->101 <!--▲登録テーブルここまで--> 102 102 </td> 103 103 </tr> 104 104 </form> 105 105 </table> 106 <!-- ¡ú¡ú¥á¥¤¥ó¥³¥ó¥Æ¥ó¥Ä¡ú¡ú-->106 <!--★★メインコンテンツ★★--> 107 107 </div> 108 108
Note: See TracChangeset
for help on using the changeset viewer.