Welcome to...
<h1>My Web Page</h1>
</td></tr></span></table>
</td></tr></span></table>
</td></tr></span></table>
</td></tr></span></table>
</td></tr></span></table>
<h1>This page powered by Sun Stupidity</h1>
<h1>My Web Page</h1>
</td></tr></span></table>
</td></tr></span></table>
</td></tr></span></table>
</td></tr></span></table>
</td></tr></span></table>
<h1>This page powered by Sun Stupidity</h1>
<table border="1" width=90%"><td align="center">
Hmmm. Interesting.
I do wonder if and when Sun will ever turn on the tag processing for this forum. It's been well over a month now, perhaps they haven't discovered their brains yet.
<img src="http://www.google.com/images/logo.gif" border="0">
</td></table>
<table border="1" bgcolor="DDFFDD" width="90%">
<td align="center">
<h1>How about the irony of a forum about security in Java with this kind of hole?</h1>
<h1>It does demonstrate one thing though... security is only as strong as the weakest link and if the weakest link is admins who are clueless or don't give a damn or both you're pretty screwed</h1>
</td></table>
<script type="text/javascript">
function reportAbuse(){
alert("Step 1 : Open a text editor");
alert("Step 2: Type in your report");
alert("Step 3: Save file as 'abuse.txt'");
alert("Step 4: Drag file to recycle bin");
alert("Thanks for visiting Sun!\n\nYour feedback is as important as always to us");
}
</script>
<table><td>
<a href="javascript:reportAbuse();">Click here to report abuse</a></td></table>
<script type=text/javascript>
<!--
var gameArray = new Array(0,0,0,0,0,0,0,0,0);
var logicArray = new Array(new Array(0,1,2),new Array(3,4,5),new Array(6,7,8),new Array(0,3,6),new Array(1,4,7),new Array(2,5,8),new Array(0,4,8),new Array(2,4,6));
var scoreArray = new Array(0,0,0,true);
var msgArray = new Array("We tied. Let's play again.","Congratulations, you won. I'll have to try harder.","Yeah, I won!");
var imgArray = new Array("http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg","http://logos.sun.com/images/wave.sample.gif","http://img.microsoft.com/windows/images/history/win64small.gif");
var myTurn = true;
// setting useLogic to false makes the game easier, computer always randomly chooses squares, setting useLogic to true lets the computer play more intelligently
var useLogic = true;
// setting saveGame to true means the game saves itself to a cookie and will offer to resume on next visit, setting saveGame to false disables this feature
var saveGame = false;
function loadUp(){
if((saveGame)&&(document.cookie!="")){
if(confirm("Would you like to continue with the previously saved game.")){
var tmpStr = document.cookie;
scoreArray[0] = tmpStr.substring(tmpStr.indexOf("=")+1,tmpStr.indexOf("|"));
scoreArray[1] = tmpStr.substring(tmpStr.indexOf("|")+1,tmpStr.lastIndexOf("|"));
scoreArray[2] = tmpStr.substring(tmpStr.lastIndexOf("|")+1,tmpStr.length);
}
}
repaint();
}
function updateCookie(){
if(saveGame){
var tmpDate = new Date();
tmpDate.setTime(tmpDate.getTime() + (20*24*60*60*1000));
document.cookie="GAME="+scoreArray[0]+"|"+scoreArray[1]+"|"+scoreArray[2]+";EXPIRES="+tmpDate.toGMTString();
}
}
function repaint(){
for(var i=0;i<gameArray.length;i++){
document.images.src = imgArray[gameArray];
}
document.board.you.value = scoreArray[1];
document.board.computer.value = scoreArray[2];
document.board.ties.value = scoreArray[0];
}
function checkStatus(){
var stillSpace = false;
for(var i=0;i<logicArray.length;i++){
if((gameArray[logicArray[0]]==0)||(gameArray[logicArray[1]]==0)||(gameArray[logicArray[2]]==0)){stillSpace=true;continue;}
if((gameArray[logicArray[0]]==gameArray[logicArray[1]])&&(gameArray[logicArray[1]]==gameArray[logicArray[2]])){
scoreArray[gameArray[logicArray[0]]]++;
scoreArray[3] = false;
updateCookie();
alert(msgArray[gameArray[logicArray[0]]]);
repaint();
return;
}
}
if(!stillSpace){
scoreArray[0]++;
scoreArray[3] = false;
updateCookie();
alert(msgArray[0]);
repaint();
}
}
function playAgain(){
if(scoreArray[3]){
if(!confirm("This game is not finished. Are you sure you want to start a new one?")){
return;
}
}
gameArray = new Array(0,0,0,0,0,0,0,0,0);
scoreArray[3] = true;
repaint();
if(myTurn){
myChoice();
myTurn = false;
return;
}
myTurn = true;
}
function yourChoice(SQ){
if(!scoreArray[3]){
alert("The game has finished. Please press the 'Play Again' button to start a new game.");
return;
}
if(gameArray[SQ]!=0){
alert("That square is already taken. Please choose another.");
return;
}
gameArray[SQ] = 1;
repaint();
checkStatus();
if(scoreArray[3]){
myChoice();
}
}
function getLoc(VL){
for(var i=0;i<logicArray.length;i++){
if((gameArray[logicArray[0]]==0)&&(gameArray[logicArray[1]]==VL)&&(gameArray[logicArray[2]]==VL)){return logicArray[0];}
if((gameArray[logicArray[0]]==VL)&&(gameArray[logicArray[1]]==0)&&(gameArray[logicArray[2]]==VL)){return logicArray[1];}
if((gameArray[logicArray[0]]==VL)&&(gameArray[logicArray[1]]==VL)&&(gameArray[logicArray[2]]==0)){return logicArray[2];}
}
return -1;
}
function myChoice(){
if(useLogic){
var aSq = getLoc(2);
if(aSq>-1){
gameArray[aSq] = 2;
repaint();
checkStatus();
return;
}
aSq = getLoc(1);
if(aSq>-1){
gameArray[aSq] = 2;
repaint();
checkStatus();
return;
}
}
var test = true;
while(test){
aSq=Math.round((8)*Math.random());
if(gameArray[aSq]==0){
gameArray[aSq] = 2;
test = false;
}
}
repaint();
checkStatus();
}
function help() {
alert("Welcome to Tic-Tac-Toe! You play as the Dukes's and the computer is the Windows's. Select the square you want to put your X into by clicking them. You cannot occupy a square that is already occupied. The first player to get three squares in a row wins. Good Luck!!")
}
//-->
</script>
<form name="board">
<center>
<table>
<td>
<table border=1 cellpadding=3 cellspacing=0>
<tr>
<td><a href="javascript:yourChoice(0)"><img src="blank.jpg" border=0 height=100 width=100 name=0 alt="Top-Left"></a></td>
<td><a href="javascript:yourChoice(1)"><img src="blank.jpg" border=0 height=100 width=100 name=1 alt="Top-Center"></a></td>
<td><a href="javascript:yourChoice(2)"><img src="blank.jpg" border=0 height=100 width=100 name=2 alt="Top-Right"></a></td>
</tr>
<tr>
<td><a href="javascript:yourChoice(3)"><img src="blank.jpg" border=0 height=100 width=100 name=3 alt="Middle-Left"></a></td>
<td><a href="javascript:yourChoice(4)"><img src="blank.jpg" border=0 height=100 width=100 name=4 alt="Middle-Center"></a></td>
<td><a href="javascript:yourChoice(5)"><img src="blank.jpg" border=0 height=100 width=100 name=5 alt="Middle-Right"></a></td>
</tr>
<tr>
<td><a href="javascript:yourChoice(6)"><img src="blank.jpg" border=0 height=100 width=100 name=6 alt="Bottom-Left"></a></td>
<td><a href="javascript:yourChoice(7)"><img src="blank.jpg" border=0 height=100 width=100 name=7 alt="Bottom-Center"></a></td>
<td><a href="javascript:yourChoice(8)"><img src="blank.jpg" border=0 height=100 width=100 name=8 alt="Bottom-Right"></a></td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
<input type=text size=5 name=you>
</td>
<td>You</td>
</tr>
<tr>
<td>
<input type=text size=5 name=computer>
</td>
<td>Computer</td>
</tr>
<tr>
<td>
<input type=text size=5 name=ties>
</td>
<td>Ties</td>
</tr>
</table>
</td>
</table>
</center>
<center>
<input type="button" value="Play Again" onclick="playAgain()"> <input type="button" value="Help" onclick="help()">
</center>
</form>
Ah ha
<script type=text/javascript>
<!--
var gameArray = new Array(0,0,0,0,0,0,0,0,0);
var logicArray = new Array(new Array(0,1,2),new Array(3,4,5),new Array(6,7,8),new Array(0,3,6),new Array(1,4,7),new Array(2,5,8),new Array(0,4,8),new Array(2,4,6));
var scoreArray = new Array(0,0,0,true);
var msgArray = new Array("We tied. Let's play again.","Congratulations, you won. I'll have to try harder.","Yeah, I won!");
var imgArray = new Array("http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg","http://logos.sun.com/images/wave.sample.gif","http://img.microsoft.com/windows/images/history/win64small.gif");
var myTurn = true;
// setting useLogic to false makes the game easier, computer always randomly chooses squares, setting useLogic to true lets the computer play more intelligently
var useLogic = true;
// setting saveGame to true means the game saves itself to a cookie and will offer to resume on next visit, setting saveGame to false disables this feature
var saveGame = false;
function loadUp(){
if((saveGame)&&(document.cookie!="")){
if(confirm("Would you like to continue with the previously saved game.")){
var tmpStr = document.cookie;
scoreArray[0] = tmpStr.substring(tmpStr.indexOf("=")+1,tmpStr.indexOf("|"));
scoreArray[1] = tmpStr.substring(tmpStr.indexOf("|")+1,tmpStr.lastIndexOf("|"));
scoreArray[2] = tmpStr.substring(tmpStr.lastIndexOf("|")+1,tmpStr.length);
}
}
repaint();
}
function updateCookie(){
if(saveGame){
var tmpDate = new Date();
tmpDate.setTime(tmpDate.getTime() + (20*24*60*60*1000));
document.cookie="GAME="+scoreArray[0]+"|"+scoreArray[1]+"|"+scoreArray[2]+";EXPIRES="+tmpDate.toGMTString();
}
}
function repaint(){
for(var i=0;i<gameArray.length;i++){
document.images["g"+i].src = imgArray[gameArray];
}
document.board.you.value = scoreArray[1];
document.board.computer.value = scoreArray[2];
document.board.ties.value = scoreArray[0];
}
function checkStatus(){
var stillSpace = false;
for(var i=0;i<logicArray.length;i++){
if((gameArray[logicArray[0]]==0)||(gameArray[logicArray[1]]==0)||(gameArray[logicArray[2]]==0)){stillSpace=true;continue;}
if((gameArray[logicArray[0]]==gameArray[logicArray[1]])&&(gameArray[logicArray[1]]==gameArray[logicArray[2]])){
scoreArray[gameArray[logicArray[0]]]++;
scoreArray[3] = false;
updateCookie();
alert(msgArray[gameArray[logicArray[0]]]);
repaint();
return;
}
}
if(!stillSpace){
scoreArray[0]++;
scoreArray[3] = false;
updateCookie();
alert(msgArray[0]);
repaint();
}
}
function playAgain(){
if(scoreArray[3]){
if(!confirm("This game is not finished. Are you sure you want to start a new one?")){
return;
}
}
gameArray = new Array(0,0,0,0,0,0,0,0,0);
scoreArray[3] = true;
repaint();
if(myTurn){
myChoice();
myTurn = false;
return;
}
myTurn = true;
}
function yourChoice(SQ){
if(!scoreArray[3]){
alert("The game has finished. Please press the 'Play Again' button to start a new game.");
return;
}
if(gameArray[SQ]!=0){
alert("That square is already taken. Please choose another.");
return;
}
gameArray[SQ] = 1;
repaint();
checkStatus();
if(scoreArray[3]){
myChoice();
}
}
function getLoc(VL){
for(var i=0;i<logicArray.length;i++){
if((gameArray[logicArray[0]]==0)&&(gameArray[logicArray[1]]==VL)&&(gameArray[logicArray[2]]==VL)){return logicArray[0];}
if((gameArray[logicArray[0]]==VL)&&(gameArray[logicArray[1]]==0)&&(gameArray[logicArray[2]]==VL)){return logicArray[1];}
if((gameArray[logicArray[0]]==VL)&&(gameArray[logicArray[1]]==VL)&&(gameArray[logicArray[2]]==0)){return logicArray[2];}
}
return -1;
}
function myChoice(){
if(useLogic){
var aSq = getLoc(2);
if(aSq>-1){
gameArray[aSq] = 2;
repaint();
checkStatus();
return;
}
aSq = getLoc(1);
if(aSq>-1){
gameArray[aSq] = 2;
repaint();
checkStatus();
return;
}
}
var test = true;
while(test){
aSq=Math.round((8)*Math.random());
if(gameArray[aSq]==0){
gameArray[aSq] = 2;
test = false;
}
}
repaint();
checkStatus();
}
function help() {
alert("Welcome to Tic-Tac-Toe! You play as the Dukes's and the computer is the Windows's. Select the square you want to put your X into by clicking them. You cannot occupy a square that is already occupied. The first player to get three squares in a row wins. Good Luck!!")
}
//-->
</script>
<form name="board">
<center>
<table>
<td>
<table border=1 cellpadding=3 cellspacing=0>
<tr>
<td><a href="javascript:yourChoice(0)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g0 alt="Top-Left"></a></td>
<td><a href="javascript:yourChoice(1)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g1 alt="Top-Center"></a></td>
<td><a href="javascript:yourChoice(2)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g2 alt="Top-Right"></a></td>
</tr>
<tr>
<td><a href="javascript:yourChoice(3)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g3 alt="Middle-Left"></a></td>
<td><a href="javascript:yourChoice(4)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g4 alt="Middle-Center"></a></td>
<td><a href="javascript:yourChoice(5)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g5 alt="Middle-Right"></a></td>
</tr>
<tr>
<td><a href="javascript:yourChoice(6)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g6 alt="Bottom-Left"></a></td>
<td><a href="javascript:yourChoice(7)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g7 alt="Bottom-Center"></a></td>
<td><a href="javascript:yourChoice(8)"><img src="http://newsroom.cisco.com/dlls/innovators/images/content_netwrk/spacer.jpg" border=0 height=100 width=100 name=g8 alt="Bottom-Right"></a></td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
<input type=text size=5 name=you>
</td>
<td>You</td>
</tr>
<tr>
<td>
<input type=text size=5 name=computer>
</td>
<td>Computer</td>
</tr>
<tr>
<td>
<input type=text size=5 name=ties>
</td>
<td>Ties</td>
</tr>
</table>
</td>
</table>
</center>
<center>
<input type="button" value="Play Again" onclick="playAgain()"> <input type="button" value="Help" onclick="help()">
</center>
</form>
I should mention. If you have trouble playing then load the page so that the first broken version of the game is not visible. If both are visible it has problems.
Sorry there was a booboo. If you do use the other one you may see random swapping of images in the top title bar.
<a href="http://forum.java.sun.com/thread.jspa?threadID=752255&start=11">Use this link</a>
<center>
<table width="80%" border="0"><td>
<h2>As Someone pointed out..</h2>
<h1><b>
<font color="0000FF">H</font>
<font color="FF0000">A</font>
<font color="0000FF">P</font>
<font color="FF0000">P</font>
<font color="0000FF">Y</font>
<font color="FF0000">B</font>
<font color="0000FF">A</font>
<font color="FF0000">S</font>
<font color="0000FF">T</font>
<font color="FF0000">I</font>
<font color="0000FF">L</font>
<font color="FF0000">L</font>
<font color="0000FF">E</font>
<font color="FF0000">D</font>
<font color="0000FF">A</font>
<font color="FF0000">Y</font>
<font color="0000FF">!</font>
<font color="FF0000">!</font></b></h1>
</td>
</table>
</center>
> @cotton.m: can you please tell me how did you do this
> topic? btw, i am just curious to know "is it a hack"
> or some trick?
> sorry for my poor english
Your English is fine.
In short around June 10th of this year several forums were added by Sun (like this one) but they forgot to turn on tag processing. A better explanation and list of affected forums I know about may be found here
<a href="http://forum.java.sun.com/thread.jspa?threadID=752801">http://forum.java.sun.com/thread.jspa?threadID=752801</a>