Way of life...

LifeType 1.2.x upgrade で admin でログインできなくなっ(て)た

LifeType — Posted by ubu @ 2008/05/14 17:32
久しぶりに、LifeType に一番偉い admin と言うユーザ名でログインしようとしたら出来なくなってた。パスワード忘れたかと思って、「Forgot your password?」から、パスワードリセットを試みるも、「The username is not correct, it is already in use or it is too long (maximum 15 characters)」 とのこと...登録時と兼用されているようなメッセージ内容はともかく、ヴァリデーション段階でコケてるようだ。

LifeType: "Admin" Blocked

まさにこれと同じ状況。admin は、許可されないユーザ名(forbidden_usernames)となったらしい。そういえば、1.2.7 クリーンインストールで admin では、次に進めなかったっけ。1.0.x の頃からの DB なのでユーザ名 admin が残っていたということ。

今回は、lt_users テーブルを直接操作してユーザ名を変更しログインできるようになりました。

forbidden_usernames についての記述は、オフィシャル Wiki の Support for Subdomains にもあります。admin はともかく、ftp や www などは、サブドメイン運用する時はNGだな。

LifeType 1.2 のコツ

LifeType — Posted by ubu @ 2008/05/14 07:51
LifeType 1.2 には、残念ながら最新版の日本語言語ファイルが配布されていません。
しかし、コアは UNICODE 対応がされており、日本語自体は扱えます。

インストールが済んだ状態で、locale/unported/locale_ja_JP-utf-8.php に古い日本語言語ファイルがあります。これを、locale にコピーし ADMINISTRATION -> New Locale で Scan Locale すれば CONTROL CENTRE -> Blog Settings の Language で Japanese locale が選択できるようになりますが、管理画面で入力した日本語は文字化けします。管理画面の charset が、iso-8859-1 となっているのが原因のようです。

管理画面の言語ファイルを用意すれば解消します。 管理画面の日本語言語ファイルは、配布物には含まれていませんが上記の「日本語言語ファイルと同名ファイルが locale/admin に存在」していれば動作するようです。ここでは、 locale/admin/locale_en_UK.php を locale/admin/locale_ja_JP-utf-8.php にコピーして使用しています。まとめると

  1. locale/locale_ja_JP-utf-8.php <- locale/unported/locale_ja_JP-utf-8.php
  2. locale/admin/locale_ja_JP-utf-8.php <- locale/admin/locale_en_UK.php
  3. ADMINISTRATION -> New Locale で Scan Locale
  4. CONTROL CENTRE -> Blog Settings の Language で Japanese locale を選択

で、日本語記事が利用できるようになります。

実際には、最新版のメッセージに合せる為、 locale/locale_ja_JP-utf-8.php は、locale/locale_en_UK.php を元に、locale/unported/locale_ja_JP-utf-8.php から、必要部分を転記しています。


Release notes Lifetype 1.2.8

LifeType — Posted by ubu @ 2008/05/08 21:36

原文

Release notes for Lifetype 1.2.8

Description

Lifetype 1.2.8 is another security release fixing an XSS vulnerability, a problem with category search in the admin interface and some more minor bugfixes.

Lifetype 1.2.8 は、XSS脆弱性(管理インターフェースのカテゴリー検索に関する問題といくつかのマイナーなbugfixes)を修正するもう一つのセキュリティリリースです。

Download

These are the links to the full Lifetype 1.2.8 packages:

Lifetype 1.2.8 (.tar.bz2)

Lifetype 1.2.8 (.tar.gz)

Lifetype 1.2.8 (.zip)

If upgrading from Lifetype 1.2.7, there are packages available which only include new or modified files and will allow you to upgrade from Lifetype 1.2.7 only. These packages can not be used to upgrade from 1.1.x or any other 1.2.x release:

もし、Lifetype 1.2.7 からアップグレードするならば、新しいか修正されたファイルのみを含んだ、Lifetype 1.2.7 からのアップグレードのみ可能なパッケージが利用可能です。これらのパッケージは、1.1.x または、他のどの 1.2 リリースからのアップグレードにも使用できません:

Lifetype upgrade package from 1.2.7 (.tar.gz)

Lifetype upgrade package from 1.2.7 (.zip)

New features

No new features have been introduced in LifeType 1.2.8.

LifeType 1.2.8 では、新しい機能は導入されていません。

Issues fixed

The complete list of issues fixed in Lifetype 1.2.8, extracted from the project's bug tracking system

0001503: [Core] When searching for article categories on a multi-blog site, categories from other blogs appear in the list. マルチブログサイトで記事カテゴリーを検索した場合、他のブログのカテゴリーがリストに記載されます。 (markwu)

0001500: [Core] Scan for new templates button will try to add files as well as directories, resulting in an error message. Scan for new templates ボタンはディレクトリと同様にファイルを加えようとし、エラーメッセージに終わります (jondaley)

0001496: [Locale] "archives" in locales_en_UK should be "Archives" for correct display (jondaley)

0001498: [Core] user permissions are checked inappropriately switching blogids and userids (markwu)

0001497: [Installation] The wizard drops the tmp_users_permissions table too soon (markwu)

0001277: [Core] Do we still need commentarticle.template and CommentAction? (jondaley)

0001492: [Installation] The release builds include the class/test directory which isn't useful for normal users (jondaley)


LifeType 1.2.7 released

LifeType — Posted by ubu @ 2008/04/09 10:08

オフィシャルの 3/30 の記事。LifeType 1.2.7 がリリースされました。

セキュリティ関係のリリースとのことですから、早速適用。チケット#1464 は、嵌った覚えがあるな。そのときは、シェルから全部の拡張子を小文字に変更したっけ。

以下は、リリースノート

Release notes for Lifetype 1.2.7

Description

Lifetype 1.2.7 is primarily a security release, though a number of issues with resources have been fixed as well.

リソースに関するいくつかの問題が解決されていますが、 Lifetype 1.2.7 は、主にセキュリティリリースです。

Download

These are the links to the full Lifetype 1.2.7 packages:

Lifetype 1.2.7 (.tar.bz2)

Lifetype 1.2.7 (.tar.gz)

Lifetype 1.2.7 (.zip)

If upgrading from Lifetype 1.2.6, there are packages available which only include new or modified files and will allow you to upgrade from Lifetype 1.2.6 only. These packages can not be used to upgrade from 1.1.x or any other 1.2 release:

もし、Lifetype 1.2.6 からグレードアップするならば、新しいか修正されたファイルのみを含んだ、Lifetype 1.2.6 からのアップグレードのみを許すパッケージが利用可能です。これらのパッケージは、1.1.x または、他のどの 1.2 リリースからのアップグレードに使用できません:

Lifetype upgrade package from 1.2.6 (.tar.gz)

Lifetype upgrade package from 1.2.6 (.zip)

New features

No new features have been introduced in LifeType 1.2.7.

LifeType 1.2.7 では、新しい機能は導入されていません。

Issues fixed

All 1.2.x versions prior to 1.2.7 are susceptible to a security bug that allowed malicious users to upload disallowed files if they used capitalized extensions (test.PHP or test.pHp). Once uploaded, they could be executed, allowing an attacker to execute any code they wanted using your user's privileges. The announcement on the forums and the bug report.

1.2.7 よりも前の全ての 1.2.x バージョンは、悪意のあるユーザーが大文字で書かれた拡張子(test.PHPやtest.pHp)を使用し許可されていないファイルをアップロードすることが可能となるセキュリティバグに影響を受けやすくなっています。一旦、アップロードされると、攻撃者は彼らが望むどんなコードもユーザー権限で実行することが可能です。そのフォーラムへのアナウンスバグレポートです。

In light of the security bug, a couple more .htaccess files were added, and existing ones made more secure. See the notes in gallery/.htaccess for ways to make it more secure than what we ship by default. The bug report

セキュリティバグを考慮して、更に一組の .htaccess ファイルが追加され、既存のものも更に安全にされました。私たちがデフォルトで出荷するその更に安全にする方法については、gallery/.htaccess を注意して参照してください。そのバグレポートです。

Various bugs with resources, regenerating previews, resizing, etc. have been fixed.

リソース、プレビューの再生成、サイズ変更などの様々なバグが解決されました。

The complete list of issues fixed in Lifetype 1.2.7, extracted from the project's bug tracking system

1464: Capitalized extensions in resources (test.JPG) now work correctly

1460: PHP_NOTICE warning in 1.2.6: defaultFiltersRegistered

1467: Picture re-sizing issue

1473:Regenerate preview has various bugs

1476: Purge spam on trackbacks page doesn't work

1477: Security: upload_forbidden_files is being checked in a case-sensitive manner

1478: Add more .htaccess files to protect all of the appropriate directories (mostly for developers)


DoCoMo フルブラウザからアクセスすると bad-behavior 発動

LifeType — Posted by ubu @ 2008/02/25 18:02

LifeType 1.2 のサイトに DoCoMo のフルブラウザからアクセスすると 403 で失敗している。機種は、SH905i 。User-Agent は、

Mozilla/4.08 (SH905i;FOMA;c500;TB)

と、なっている。Apache の Forbidden ではないし、 error_log にもそれらしい痕跡がないので LifeType が返しているらしい。

返ってくるページの内容の一部をキーワードにソースを検索してみたら、 bad-behavior プラグインの中にあった。

bad behavior は、わりと新しいスパムフィルタ技術の一種らしい。既知のスパムボットの HTTP リクエストヘッダを判定してブロックする。リンクスパム(コメントやトラバ)に特化されているのかな。ここには、bayesian フィルターが以前から設置されていたけど「スパムではない」コメントやトラバが圧倒的に不足(^_^; していたのであまり機能していなかった。

DB にブロックしたログがあるらしいので問合せてみる。 request_entity は、抜いておかないと見難くなる。

select id
,ip
,date
,request_method
,request_uri
,server_protocol
,http_headers
,user_agent
,lt_bad_behavior.key 
from lt_bad_behavior 
order by date;

user_agent がマッチしたレコードがあるからブロックされてるらしい(^-^;

key = 17566707 となってるからそれでソースを探してみると、いっぱい出てきた。ただ、 blacklist.php で引っかかってるわけじゃないみたい。core.inc.php の bb2_start で blacklist.php を通過したあとに各ブラウザ処理に行ってる。この場合は、mozilla.inc.php の bb2_mozilla に行ってるはず。で、Accept ヘッダがないから 17566707 ってことらしい。

whitelist にドコモのフルブラウザアクセス時のIPアドレスを加えてしまうことも考えたが、その他の有用かもしれないチェックも全てスルーされてしまうのでもったいない。ユーザーエージェントのチェックで Mozilla の一種として「お行儀の悪いMozilla」と判定されているので、mozilla.inc.php の bb2_mozilla にドコモフルブラウザのユーザーエージェントパターンルートを設けた。

SH904i/SH905i からは、アクセスできることを確認できたのでOKかな。


Updating templates for LifeType 1.2

LifeType — Posted by ubu @ 2008/02/06 17:52

原文

Introduction

Templates from LifeType 1.1 should work flawlessly in LifeType 1.2 but they will be missing some of the new features available in the new release such as paging of comments or detection of the logged-in user in the comment form.

LifeType 1.1 からのテンプレートは、 LifeType 1.2 で無傷に動作するはずですが、それらはコメントのページングやコメントフォームにおける、ログインしているユーザの検出などの新版で利用可能な新機能のいくつかを逃すでしょう。

In addition to this, templates from LifeType 1.2 will not work properly if they are using any of the unported plugins.

これに加えて、移植が済んでいないプラグインのいずれかを使用しているならば、 LifeType 1.2 からテンプレートはきちんと動きません。

The following sections will list some of the improvements related to the template layer that you should bear in mind in order to have a fully working version of your template under LifeType 1.2

以下のセクションでは、 LifeType 1.2 であなたのテンプレートの完全に働くバージョンを持つために覚えておくべきであるテンプレート層に関連するいくつかの改良点をリストします。

Changes in LifeType 1.2

Paging of comments

LifeType is able to split the list of comments received for a post over several different pages. This has the double advantage of generating smaller pages and of pulling a smaller amount of data from the database every time. Think about loading a post page with over 1000 comments!

The changes needed to get paging for comments working are described Template Guidelines#Paging for comments.

Comment form for authenticated users

LifeType 1.2 is able to detect the user who is currently logged in an pre-fill the username field of the comment input form, in addition to marking the comment as being posted by an authenticated user.

There are some changes required to implement this in your templates but the best solution is to remove your version of commentform.template altogether, and let LifeType use the global one stored under templates/default/. This process will happen automatically (as part of a new feature available in LifeType 1.2) and all you have to do is tweak the CSS code of your template to make it use the classes used by the default comment form.

There are more details on this feature in the Template Guidelines#Comment form for authenticated users.

Automatic page titles

This is a feature that should please those who have been heavily customizing their page titles to please search engines. LifeType will now generate generally good enough page titles that can be directly used in our pages via the {$pageTitle} tag. The old method of customizing the page title at the Smarty/template level is of course possible, but this solution should be good enough for most users.

There are more details in the Template Guidelines#Page titles

Anti-Spam tests

You should add the following code to your header.template in order to take advantage of all of the built-in anti-spam tests.

{if $badbehavior}    {$badbehavior->showBB2JavaScript()} {/if}

More information is here.


Upgrade

LifeType — Posted by ubu @ 2008/02/05 19:31

 

 

原文

Upgrading to LifeType 1.2

Before considering an upgrade to LifeType 1.2, please bear in mind that not all plugins and template sets have been updated to work with LifeType 1.2. If your blog or blogging site depends on any of the unported templates to work, please consider helping the project to get them updated. While we have tried to assure an smooth upgrade path for users coming from LifeType 1.1, we have only been able to focus on the most critical and popular templates and plugins.

LifeType1.2 へのアップグレードを考える前に、すべてのプラグインとテンプレートセットが LifeType1.2 で動作するようアップデートしていないことを覚えておいてください。あなたのブログ、または、ブログサイトが働くためにまだ移植されていないテンプレートのいずれかに依存するならば、それらを更新させるプロジェクトを助けることを考えてください。 LifeType1.1 ユーザのためにスムースなアップグレード経路を保証しようとした間、私たちは最も重要でポピュラーなテンプレートとプラグインに焦点を合わせることができただけです。

The list of available plugins and templates for LifeType 1.2 can be obtained from our Subversion repository, via browser in the following URL for templates: http://devel.lifetype.net/svn/plog/templates/branches/lifetype-1.2 and for plugins: http://devel.lifetype.net/svn/plog/plugins/branches/lifetype-1.2. If the plugin or template appears in the unported folder, it means that it has not been ugprade to work and that it should not be used. If a plugin or template appears in the list of ported templates, it should be downloadable via SourceForge.

Regarding template sets, please bear in mind that templates that have been customized by your users will also need to be updated to use some of the new features. Please see Updating templates for LifeType 1.2 which contains more information related to getting templates to work with LifeType 1.2.

Site administrators will probably have to advise their less technically minded users on how to get templates working again. In the meantime, please use the "admin mode" feature to change the settings of the blogs whose templates are not working to use a working one.

Download and Setup

Backing up your data

Before even downloading LifeType 1.2, it is strongly recommended that you back up all your data. This includes:

- All PHP code and classes, including customizations if any. - All customized templates - All files under the gallery/ folder.

The contents of the tmp/ folder are not necessary and do not need to be included in a backup.

However the area that deserves the most attention when backing up your currently working instance is the SQL data. Use your favourite tool (such as phpMySQLAdmin) to back your data up and keep this back up around for a while. The upgrade process has been thoroughly tested but you never know when you may realise that some data is not correct.

Downloading

LifeType releases are always made avaiable via the project page at Sourceforge.net. Please get the latest release from the Downloads section in either .tar.gz or .tar.bz2 format.

Extraction and Upload

If you've downloaded LifeType from the LifeType project page, the files should have arrived on your computer in an archived format. In Windows, WinZip is capable of reading both .tar.gz and .tar.bz2. StuffIt in Mac OS X is also capable of handling this kind of files or you can always open a Terminal session and use 'tar'.

あなたが LifeType プロジェクトページから LifeType をダウンロードしたなら、ファイルはあなたのコンピュータに書庫形式で届くはずです。 Windows では、WinZip で .tar.gz と .tar.bz2 両方読めるはずです。 また、Mac OS X の StuffIt は、この種類のファイルを扱うことが出来ますし、あるいは、ターミナルセッションをオープンして 'tar' を使うことも、もちろん可能です。

Before uploading the new version, back up a copy of the config/config.properties.php file to make sure that you do not overwrite it with the default version.

新しいヴァージョンをアップロードする前に、デフォルトバージョンで上書きしないことを確実にするため、config/config.properties.php ファイルのコピーをバックアップしてください。

After making a backup copy of your config.properties.php file, delete everything from your current instance except the contents of the gallery/ folder and any customized templates you may have. In the past there have been issues with FTP clients not overwriting all files with the new copies as expected, resulting in old files mixed with new files and therefore the project recommends to remove everything before installing a new release.

config.properties.phpファイルのバックアップコピーを作ったら、あなたが所有する gallery/ フォルダーの内容とカスタム設計されたテンプレートを除いて、現在のインスタンスからすべてを削除してください。 過去にあった FTP クライアントの問題として、新しいコピーで全てのファイルを上書きしないことで古いファイルと新しいファイルが混在してしまうことが予想されることから、新しいリリースをインストールする前に全てを削除することをプロジェクトでは推奨しています。

Now please upload the new version.

では、新しいバージョンをアップロードしてください。

Once all the new files have been uploaded, overwrite the stock version of config/config.properties.php with the copy that you kept before.

すべての新しいファイルを一旦、アップロードした後、以前取っておいたコピーで config/config.properties.php のストックバージョンを上書きしてください。

Start the wizard.php script. Wizard.php will detect your old settings in the configuration file and start the upgrading process automatically (keep reading for more information)

wizard.php スクリプトを始めてください。 Wizard.php は、構成ファイルの古い設定を見つけて、自動的にグレードアッププロセスを始めます(詳細は読み続けてください)

Setting up for Upgrade

No special requirements are needed in order to start the upgrade process, just make sure that the 'tmp/' folder is writable. Since we're only performing an upgrade, the wizard will not write anything to the config/config.properties.php file so there is no need to make it world-writable as if we were performing a clean, fresh installation.

どんな特別な要件もアップグレードプロセスを始めるために必要ではありませんが、 'tmp/' フォルダーが書き込み可能ことだけを確認してください。アップグレードを行うだけなので、 wizard は、 config/config.properties.php ファイルに何も書き込まないので、クリーン、フレッシュインストールを行うときのように world-writable にする必要はありません。


LifeType 1.0.4

LifeType — Posted by ubu @ 2006/04/25 03:02

原文

意味は変わらないように注意したつもり。

Hopefully the last maintenance release of the 1.0 branch, LifeType 1.0.4 is now available containing a fix for a cross-site scripting vulnerability recently reported.

出来れば、1.0 ブランチの最後のメンテナンスリリースとなる、最近、報告されたクロスサイト スクリプティング脆弱性への対策を含む、LifeType 1.0.4が、利用可能です。

LifeType 1.0.4 is a very small release that includes, amongst some minor fixes, an important fix to an XSS vulnerabilty. All sites running versions prior to 1.0.4 are affected and it is therefore strongly advised to upgrade to this release.

LifeType 1.0.4 は、XSS 脆弱性への重要な修正、いくつかの小さな修正を含んでいる非常に小さなリリースです。1.0.4 以前のバージョンを実行するサイトはすべて影響されますから、このリリースにアップグレードするように強く勧めます。

As with any release, packages are available in .ZIP, .TAR.GZ and .TAR.BZ2 format from Sourceforge.net:

lifetype-1.0.4.zip
lifetype-1.0.4.tar.gz
lifetype-1.0.4.tar.bz2

Please keep in mind that is not necessary to run wizard.php if you are upgrading from any 1.0.x version to 1.0.4, as there are no changes in the database schema. Simply upload the files and overwrite all older files except the configuration files under the config/ folder.

データベース スキーマに変更がないので、任意の1.0.xバージョンから1.0.4にアップグレードでは、wizard.php を実行する必要はないことを覚えておいて下さい。単純に、ファイルをアップロードし、config/ フォルダ以下のコンフィグレーションファイル以外の全ての古いファイルを上書きしてください。

Additionally, we have "update only" packages from LifeType 1.0.3 to 1.0.4, which only include new or modified files. These packages can not be used to upgrade from 1.0, 1.0.1 or 1.0.2, but only from 1.0.3 to 1.0.4. There is no need to run wizard.php to upgrade to this release. Just upload the files and you are good to go:

それと、私たちは、LifeType 1.0.3 から 1.0.4 への "update only" パッケージを持っています。。それは新しいファイルあるいは修正されたファイルのみを含んでいます。

lifetype-1.0.3-upgrade-1.0.4.tar.gz
lifetype-1.0.3-upgrade-1.0.4.zip

There is a full list with all the issues fixed in this release in Mantis (select the filter called "Fixed in 1.0.4")

Please use the LifeType forums or the LifeType bug-tracker in case you need to discuss anything or report any bug related to LifeType 1.0.4. In the meantime, the development team will continue working on LifeType 1.1 (more news on that soon)

ってわけで、更新完了。見逃してた...


Powered by LifeType