From 091f1a8bf196ba05f0fa432c9c95936d221bfe63 Mon Sep 17 00:00:00 2001 From: shizuki Date: Fri, 13 Feb 2009 05:22:07 +0000 Subject: [PATCH] instructions for manually adding .htaccess files to media and skins folder after upgrade. Comment count at items list display via 'sprintf()'. git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk/utf8@938 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- extra/htaccess/media/readme.ja.txt | 23 +++++-------- extra/htaccess/media/readme.txt | 19 ++++------ extra/htaccess/skins/readme.ja.txt | 19 +++++----- extra/htaccess/skins/readme.txt | 12 ++++--- nucleus/documentation/history.html | 1 + nucleus/upgrades/index.php | 36 +++++++++++++++++-- nucleus/upgrades/upgrade.functions.php | 7 +++- nucleus/upgrades/upgrade.php | 10 ++++-- nucleus/upgrades/upgrade3.4.php | 63 ++++++++++++++++++++++++++++++++++ 9 files changed, 144 insertions(+), 46 deletions(-) create mode 100644 nucleus/upgrades/upgrade3.4.php diff --git a/extra/htaccess/media/readme.ja.txt b/extra/htaccess/media/readme.ja.txt index 73b4d8a..45be204 100644 --- a/extra/htaccess/media/readme.ja.txt +++ b/extra/htaccess/media/readme.ja.txt @@ -1,17 +1,12 @@ -Nucleus Media ディレクトリ ------------------------ +このディレクトリのmedia.htaccessファイルは、mediaディレクトリでのスクリプトの実行を阻止し、サーバのセキュリティを強化することを意図しています。 +これは悪意を持ったものが、mediaディレクトリにアップロードしたファイルを実行させることを防ぎます。 +ただし、.htaccessでの制限の許可・不許可はサーバの設定に依存しているので、コードが意図されたとおりに動くとは限りません。 -アップロードされた画像等のファイルは、最終的にこのディレクトリに移動されます。 +下記の手順に従って、.htaccessを適用してください +1. mediaディレクトリに他の.htaccessファイルがないことを確認します。 +2. 「mrdia.htaccess」ファイルを、Nucleusのmediaディレクトリにコピーします。 +3. ファイルを「mrdia.htaccess」から「.htaccess」にリネームします。 +4. もし、すでに.htaccessファイルがmediaディレクトリに存在した場合は、すでにある.htaccessファイルに「mrdia.htaccess」の内容を追記します。 -サブディレクトリについて: - -* 数字 (例 /media/1/) - -アップロードしたメンバーだけがファイルを使用できます。(ディレクトリ名はメンバーIDになります) - -* 数字以外 (例 /media/common/) - -誰が使ってもいいファイルを保存しておく為のディレクトリ。 -ディレクトリを作ってパーミッションを777等にしておくだけで、新しいコレクションとして追加されます。 - +これでmediaディレクトリを、意図しないスクリプトの実行から保護することが出来ます。 diff --git a/extra/htaccess/media/readme.txt b/extra/htaccess/media/readme.txt index 308d3a1..b302899 100644 --- a/extra/htaccess/media/readme.txt +++ b/extra/htaccess/media/readme.txt @@ -1,15 +1,10 @@ -Nucleus Media Directory ------------------------ +PLEASE NOTE: The media.htaccess file in this directory is intended to enhance security of your server by disallowing the running of scripts from the media folder. This will protect against rogue members, or external exploits, that rely on uploading script files to this folder for execution at a later time. Depending on the configuration of your web server, this code may not run as intended. -Uploaded images will end up in the media directory. +To apply it, follow these instructions: -Subdirectories work as follows: - -* numeric (e.g. /media/1/) - -Media files for a certain member (directory name is the memberid) - -* other directories (e.g. /media/common/) - -Global media collections that can be used by any member that is on a team. In order to create a new collection, simply create a new directory and assure write access is enabled for it. +1. Be sure that another .htaccess file does not exist in the /media folder +2. Copy the media.htaccess file into the media folder of your Nucleus CMS installation +3. Rename the file to .htaccess +4. If you have an existing .htaccess file in your media folder, copy the contents from the media.htaccess file into the existing .htacces file. +You can disable after installing it by renaming the file to something else, or by removing the file from that folder. \ No newline at end of file diff --git a/extra/htaccess/skins/readme.ja.txt b/extra/htaccess/skins/readme.ja.txt index 073d092..728c356 100644 --- a/extra/htaccess/skins/readme.ja.txt +++ b/extra/htaccess/skins/readme.ja.txt @@ -1,12 +1,13 @@ -Nucleus skins ディレクトリ ------------------------ +このディレクトリのskins.htaccessファイルは、各スキンで使用する「.inc」ファイルや「.php」ファイルに対する外部からの直接アクセスを禁止し、サーバのセキュリティを強化することを意図しています。 +ただし.htaccessでの制限の許可・不許可はサーバの設定に依存しているので、コードが意図されたとおりに動くとは限りません。 +例えば、意図せずに一部のファイルへのサーバ内でのアクセスまで禁止されてしまって、あなたのサイトにCSSが適用されずに表示されるようなことがあるかもしれません。 +その時は.htaccessファイルをリネームして問題を解決してください。 -注意:このディレクトリ内(サブディレクトリを含む)にある、skinbackup.xml や skindata.xml 等のファイルを直接編集することは避けてください。 - これらのファイルはユーザーに配布する為に、Nucleusの機能を使用して作成されています。 +下記の手順に従って、.htaccessを適用してください - スキンを編集する時は、Nucleusの管理エリアで左のメニューから「スキン編集」を選択し、スキン編集画面へと進んでください。 +1. skinsディレクトリに他の.htaccessファイルがないことを確認します。 +2. 「mrdia.htaccess」ファイルを、Nucleusのskinsディレクトリにコピーします。 +3. ファイルを「skins.htaccess」から「.htaccess」にリネームします。 +4. もし、すでに.htaccessファイルがskinsディレクトリに存在した場合は、すでにある.htaccessファイルに「skins.htaccess」の内容を追記します。 -注意:このディレクトリの.htaccessファイルは、ディレクトリ内(サブディレクトリを含む)の .inc ファイルや .php ファイルに外部から直接アクセス - することを禁止する為のものです。 - サーバの設定によっては、.htaccessに記述された内容が、意図したとおりに動作しないことがあります。 - スキンの表示が壊れている時は、.htaccess ファイルを修正することで直ることがあります。 \ No newline at end of file +これでskinsディレクトリを、不要なアクセスから保護することが出来ます。 diff --git a/extra/htaccess/skins/readme.txt b/extra/htaccess/skins/readme.txt index 3844617..6d61376 100644 --- a/extra/htaccess/skins/readme.txt +++ b/extra/htaccess/skins/readme.txt @@ -1,8 +1,10 @@ -Nucleus skins directory ------------------------ +PLEASE NOTE: the skins.htaccess file in this directory is intended to prohibit, for enhanced security, direct access .inc and .php files in the skin folders. Depending on the web server configuration, the code in this .htaccess file may not work as intended. In this case, your site will be displayed incorrectly, with missing content or style. Renaming the .htaccess file should fix the problem. -PLEASE NOTE: the skinbackup.xml or skindata.xml files in these directories are not where you should edit the skins. These files get generated by the Nucleus skin export function and are meant to distribute skins between Nucleus users. +To apply it, follow these instructions: -To edit skins, open the Nucleus Admin Area, and select 'skins' in the left menu. +1. Be sure that another .htaccess file does not exist in the /skins folder +2. Copy the skins.htaccess file into the skins folder of your Nucleus CMS installation +3. Rename the file to .htaccess +4. If you have an existing .htaccess file in your skins folder, copy the contents from the skins.htaccess file into the existing .htacces file. -PLEASE NOTE: the .htaccess file in this directory is intended to prohibit, for enhanced security, direct access .inc and .php files in the skin folders. Depending on the web server configuration, the code in this .htaccess file may not work as intended. In this case, your site will be displayed incorrectly, with missing content or style. Renaming the .htaccess file should fix the problem. \ No newline at end of file +You can disable after installing it by renaming the file to something else, or by removing the file from that folder. \ No newline at end of file diff --git a/nucleus/documentation/history.html b/nucleus/documentation/history.html index 07521a7..b6ad1a1 100755 --- a/nucleus/documentation/history.html +++ b/nucleus/documentation/history.html @@ -165,6 +165,7 @@
  • Nucleus v3.3 (May 1, 2007)