This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-03-15 14:11:28

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

"Hacking" Scratch Websites - Using html and tags, etc.

It has come to my attention (quite directly) that the html of the rest of a scratch project page can be edited by entering special characters into the tags section which interfere with the html code  for the page. for instance, I entered

Code:

"> </div>

into the tags box, and when I reloaded the page, everything after the "add tags" that is usually above the place where you type in new tags, including "link to this project" and "more projects by ___" was moved to the bottom of the page, left justified, apparently removed from the div that keeps all of that stuff on the right side of the screen. this was amusing. I hoped that people wouldn't hate me hugely because I hacked it. but, this shows how weak and insecure the tags are. when you insert html into a comment, it doesn't show up. when you insert it into a tag though, it does. some ways to fix this problem may be discussed. I will show the html code segment for a tag:


Code:

//<![CDATA[
Event.observe('link1111111111', 'click', function(event) { new Ajax.Updater('tag-123','/projects/upgradeTag/222222/normal', {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'tag-123']}) }, false);
//]]>
</script></span><span><a href="#" id="link333333333" onclick=" event.returnValue = false; return false;" title="flag this tag?">[flag]</a><script type="text/javascript">
//<![CDATA[
Event.observe('link333333333', 'click', function(event) { new Ajax.Updater('tag-123','/projects/markTag/222222/normal', {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'tag-123']}) }, false);
//]]>
</script></span>            </span>
    </li>
        <li id="tag-4444">

    <span class="tag_size_1"><a href="/tags/view/tagname">tagname</a></span>
        
            <span class='tag_actions'>
                        <span><a href="#" id="link1111111111" onclick=" event.returnValue = false; return false;" title="affirm this tag?">[+]</a><script type="text/javascript">

where "tagname" is the name of the tag, and "1111111111", "222222", "333333333", "123", and "4444" are all just numbers, made up randomly, which all may or may not show up in one place but are all the same number of digits as the original one I found it in.


so, people, I challenge you to find a way to make it so that I cannot enter something into a tag and mess up the formatting, just like with a comment! it might be tricky because one of the things that is different is that the html used makes it so that people are able to change the inside of the "< a >" tags, which is different from comments [and project notes, etc.]

Here, discuss ways to fix this problem, so that neither a relatively inexperienced hacker or a person who just types something randomly inadvertently can change anything except for that one tag, if even that (some people tried changing sizes and colors before me)

I am not sure if I extracted the code right. I may have half-segments from two tags.

Offline

 

#2 2009-03-15 16:37:04

jamie
Scratcher
Registered: 2007-03-28
Posts: 100+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

That DOES work...

I kinda ruined someone project though. OOPS  smile
http://scratch.mit.edu/projects/mcflurry/455345


Check out my flash game site at http://subgaming.net/

Offline

 

#3 2009-03-16 18:47:54

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

it appears to have been partially fixed.  sad

Offline

 

#4 2009-03-16 20:37:09

AlanProjects
Scratcher
Registered: 2008-06-23
Posts: 500+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

That was fun  sad

Offline

 

#5 2009-03-17 05:00:40

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

Thanks for bringing this bug to our attention!  I'll write it up for the bug list  smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2009-03-17 14:14:35

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

Paddle2See wrote:

Thanks for bringing this bug to our attention!  I'll write it up for the bug list  smile

I think they want it....

Offline

 

#7 2009-03-19 17:24:09

jeffy24
Scratcher
Registered: 2008-12-23
Posts: 61

Re: "Hacking" Scratch Websites - Using html and tags, etc.

DarthPickley wrote:

it appears to have been partially fixed.  sad

Why? http://www.mysmiley.net/imgs/smile/sad/sad0006.gif http://www.mysmiley.net/imgs/smile/sad/sad0006.gif http://www.mysmiley.net/imgs/smile/sad/sad0006.gif http://www.mysmiley.net/imgs/smile/sad/sad0006.gif http://www.mysmiley.net/imgs/smile/sad/sad0006.gif http://www.mysmiley.net/imgs/smile/sad/sad0006.gif http://www.mysmiley.net/imgs/smile/sad/sad0006.gif http://www.mysmiley.net/imgs/smile/sad/sad0006.gif


I'M A CREEPER http://4.bp.blogspot.com/-Fj1t1TmbPtc/UAp3ludvGCI/AAAAAAAAAlI/RXSkO96QN20/s1600/creeper.png

Offline

 

#8 2009-03-20 08:46:44

ScratchScripter
Scratcher
Registered: 2008-08-21
Posts: 73

Re: "Hacking" Scratch Websites - Using html and tags, etc.

jeffy24 wrote:

DarthPickley wrote:

it appears to have been partially fixed.  sad

Why?

Because Scratch runs on PHP (I think) and you could use the <?php ?> code to really hack the website.

Last edited by ScratchScripter (2009-03-20 08:47:06)

Offline

 

#9 2009-03-20 17:08:51

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

ScratchScripter wrote:

jeffy24 wrote:

DarthPickley wrote:

it appears to have been partially fixed.  sad

Why?

Because Scratch runs on PHP (I think) and you could use the <?php ?> code to really hack the website.

No. What happens with the tags is client side - it runs on the users computer. The php is on the server and just can't be changed without server username and password  tongue


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#10 2009-06-07 19:55:10

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

JSO wrote:

ScratchScripter wrote:

jeffy24 wrote:


Why?

Because Scratch runs on PHP (I think) and you could use the <?php ?> code to really hack the website.

No. What happens with the tags is client side - it runs on the users computer. The php is on the server and just can't be changed without server username and password  tongue

umm, actually, that's how, not why, but whatever. though its funner to cause scratch glitches than when they just happen by themselves...

Offline

 

#11 2009-06-07 21:11:49

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

DarthPickley wrote:

JSO wrote:

ScratchScripter wrote:


Because Scratch runs on PHP (I think) and you could use the <?php ?> code to really hack the website.

No. What happens with the tags is client side - it runs on the users computer. The php is on the server and just can't be changed without server username and password  tongue

umm, actually, that's how, not why, but whatever. though its funner to cause scratch glitches than when they just happen by themselves...

He was explaining that that was impossible.
But you can still add HTML, which is disabled in comments but apparently not tags  smile

Offline

 

#12 2009-06-08 03:48:35

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: "Hacking" Scratch Websites - Using html and tags, etc.

coolstuff wrote:

You can still add HTML, which is disabled in comments but apparently not tags  smile

Do you know that you can even try to put your ad that way? I wonder why they haven't fixed that bug. It's a welcoming door for hackers!


Converting my Scratch projects to Python!

Offline

 

Board footer