[Fswiki-dev] usercssについて

Back to archive index

Naoki Takezoe takez****@can*****
2003年 6月 13日 (金) 10:16:32 JST


竹添です。

エスケープして問題ないと思います。
3.4.1dev2でパッチをあてておきます。

パスワードについてはcryptしたものを保存するとか
もうちょっとなんとかしたいですね。

typer <typer****@cubic*****> wrote:

> typer.加藤です。
> 
> 早速ですが、ユーザ定義スタイル(usercss)はUtil::escapeHTML通してないですよね。
> そのためにSTYLEタグを閉じて任意のタグを入れることが出来ます。
> CSSは詳しくないのでわからないのですが、Util::escapeHTMLを通して表示すると
> 不都合がありますか?
> 
> というのも、一応usercssの変更が出来るのは管理者だけですが、
> その管理者のパスワードは御世辞にも信頼性が高いとは言えません。
> もし、悪意ある第三者に知られたら、なにも知らない訪問者を攻撃できる、
> つまりXSS脆弱性となりえます。
> そんなわけで、不都合がなければ、以下のパッチでどうかと思うのですが。
> 
> --- lib/Wiki.pm.orig	Thu Jun 12 11:39:06 2003
> +++ lib/Wiki.pm	Thu Jun 12 23:30:48 2003
> @@ -530,7 +530,7 @@
>  		if($usercss ne ""){
>  			print "<style type=\"text/css\">\n";
>  			print "<!--\n";
> -			print Util::load_config_text($main::usercss_file);
> +			print Util::escapeHTML($usercss);
>  			print "-->\n";
>  			print "</style>\n";
>  		}
> 
> #ついでに、Util::load_config_textが2回呼ばれているというbugもfix。
> では
> -- 
> typer        tyepr****@cubic***** 
> Noboru Katoh typer****@goenn*****
> gpg fingerprint = 1915 B6D2 4761 E104 1046  BF4C 8E0C 7FA5 9EC3 7180     
> _______________________________________________
> Fswiki-dev mailing list
> Fswik****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/fswiki-dev


--
Naoki Takezoe <takez****@can*****>



Fswiki-dev メーリングリストの案内
Back to archive index