This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Advanced Topics
  •  » ITopic: The small steps on how to secure your online site or community

#1 2011-10-17 14:48:24

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

ITopic: The small steps on how to secure your online site or community

The small steps on how to secure your online site or community
A guide by LS97

Once you get into computers and programming, sometimes just visiting sites isn’t enough. Making your own site becomes a fun and useful alternative. This often turns out to be very productive, educational and satisfying. However, there are some really useful key points that you want to keep in mind while creating your online community.

Passwords, passwords, passwords…
First of all, you need a good password. This keeps on coming up everywhere, from school email accounts to game registrations, and it’s a must. It is extremely important to get a strong password and keep it safe. Nobody needs to know it, and it has to be hard to guess but easy to remember.

Choosing the tools
Second, think about the purpose of your site. What will people use it for? Who will use it? How? If the site is meant to promote a product and give more information about it, it’s better to use an online site maker such as Weebly. In general, these popular online site makers are better to use for this kind of site because they are more secure. Try to avoid site makers with advertisements because they can contain viruses or inappropriate content that you can’t control.

If you want to make an online community with user-moderated forums, uploads, or chats, the story gets a bit more complicated. You need to start from a blank file in notepad, and there are a lot of security precautions to take.

Before you even start, you have to know the basics of whatever programming language you’ll use (commonly PHP). Trust me, it helps.

I’ve got the power!
As much as your own passwords are important, so are the passwords and information about other users. Make sure that all of the user’s information is stored safely on the server and is encrypted. Also store the users’ IP address in a database so that you can ban them if they do anything wrong.

Moderation is another important aspect of online communities. Any user-submitted content (forums, chats, messages, comments, blogs) must have a word filter/censor in place! Also, check the content regularly to make sure no bad pictures are posted. Private chats are dodgy because they can’t be moderated, so avoid them.

You might get excited about being able to control other users: don’t abuse of your power. It’s never a good idea to allow many people to moderate your site. You will manage just fine with yourself alone as a moderator. If your site gets very popular you can maybe add a second power-person. I wouldn’t have more than that because things will get difficult to manage.

Spam time!
Spam has become so popular that even the most secure sites nowadays are occasional victims of this senseless practice. On your forums, try to implement a system similar to the one on the Scratch website. When a user registers, give them partial abilities until you know you can trust them.

As much as the 60 second rule is annoying, it helps so much in reducing spam I can’t even describe it. Being a nice guy and removing the rule from your site will probably earn you hours of spam-removal.

The time rule doesn’t only have to apply to forums. Uploads can be a big problem to remove if you don’t have the good tools, so prevention is the key. Add a 5 minute delay between uploads and you’ll be fine.

Just in case spam does happen, and it’s inappropriate, think of an easy method to quickly remove it or hide it from view, until you took care of it completely. You don’t want a bunch of people seeing stuff they don’t want to see.

Verification of Scratchers – Not everyone is who they say they are…
On the internet it’s really easy to pretend you’re someone other than who you really are. Some bad people might pretend to be a known Scratcher and apply for admin on your site under that fake username. To avoid this happening, first ask the user to post a comment on your Scratch projects with that account name. If they don’t, there’s a good chance they’re some kind of bad guy.

The Happy Ending
Once you think you’re following these rules and feel good about your site’s security, you can go ahead and publish it. Run it through to the Scratch Team to see if it’s acceptable to advertise on the Scratch Forums. If you’re lucky, you’ll see your site grow from a bunch of code to a wonderful community.
Have fun making your own site!  big_smile

Last edited by scimonster (2012-05-21 14:01:52)

Offline

 

#2 2011-10-17 15:00:54

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Very good!  big_smile

Offline

 

#3 2011-10-17 15:05:59

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Some good advice there, LS97! Unlike so many website guides, this focuses less on the code and more about how to run the site, something plenty of Scratchers here with their own sites should read and take on board!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#4 2011-10-17 16:08:32

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: ITopic: The small steps on how to secure your online site or community

Useful, and informative. Indeed good advice.


http://i.imgur.com/zeIZW.png

Offline

 

#5 2011-10-17 20:48:19

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Great information.  Apparently P2S like it too.  Check the announcement about user-created sites!


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#6 2011-10-18 07:07:28

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Cool, thanks!  smile


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#7 2011-11-23 19:09:01

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: ITopic: The small steps on how to secure your online site or community

Nice advice! I read through it, and it's pretty good. Here are some ideas I came up with:

When a user submits a comment, it will go through moderation before the comment can be posted. This will definitely prevent spam.

Download a program that is constantly checking the website for spam. Have some antivirus just in case.

Be nice.

That's all I could think of.


Marzipan11 must learn to not spoil

Offline

 

#8 2011-11-24 04:53:20

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Putting posts through moderation before allowing users to see the post is certainly a way to stop spam but it can seriously frustrate users if they have to wait 24hrs or so for their post to appear. It can also cause a lot of grief for mods if there are a lot of posts. In my opinion, it is better to supply a report button on each post and allow each post to appear UNTIL it is flagged. Not quite as safe as your suggestion but much more implement-able. Have your mods skim through the site keeping an eye out and there should be no problems. What I have for the in-progress block library site is a moderator page that lists all posts that have not yet been confirmed as spam or not spam and allows them to see and categorise each post properly from one page.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#9 2012-01-21 06:20:55

PurpleStarMagicDash
New Scratcher
Registered: 2012-01-11
Posts: 16

Re: ITopic: The small steps on how to secure your online site or community

usefull info! thanks!

Offline

 

#10 2012-03-05 17:28:05

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Cool, this is great!


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#11 2012-04-30 22:40:52

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Ask yourself before creating the website:  why are you creating it? And for what purpose it will serve.  Keeping those two things in mind will help you with how to deal with different situations.  Great guide!


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#12 2012-05-01 20:03:19

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

GREAT guide!


6418,

Offline

 

#13 2012-05-01 20:10:16

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Thanks for the time you took to write this up LS97!  smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#14 2012-05-19 22:39:08

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Something should probably be said on here about SQL Injection and XSS prevention as well


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#15 2012-05-20 04:54:52

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: ITopic: The small steps on how to secure your online site or community

SJRCS_011 wrote:

Something should probably be said on here about SQL Injection and XSS prevention as well

Essentially, remember to escape all user input (don't trust any of it) with mysql_real_escape_string($string); (on php at least) and for preventing xss remember to escape all html characters (htmlspecialchars($string)) and other precautions.

XSS (Cross Site Scripting) Prevention Cheat Sheet

SQL Injection Prevention Cheat Sheet

Last edited by rookwood101 (2012-05-20 04:56:29)


http://i.imgur.com/zeIZW.png

Offline

 

#16 2012-05-20 08:23:46

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

SJRCS_011 wrote:

Something should probably be said on here about SQL Injection and XSS prevention as well

This guide is more focused around the principles behind it, rather than the specific codes or workaround prevention. I assumed that if you know how to code, you know how easy it is to inject scripts onto badly-protected pages  wink

Offline

 

#17 2012-05-21 14:03:55

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Enjoy the new status of ITopic.  smile

Offline

 

#18 2012-05-21 16:55:25

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

scimonster wrote:

Enjoy the new status of ITopic.  smile

Gee, thank you  smile

Offline

 

#19 2012-05-21 21:40:03

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

LS97 wrote:

SJRCS_011 wrote:

Something should probably be said on here about SQL Injection and XSS prevention as well

This guide is more focused around the principles behind it, rather than the specific codes or workaround prevention. I assumed that if you know how to code, you know how easy it is to inject scripts onto badly-protected pages  wink

Precisely why you should mention something about it.  Now that almost everyone on Scratch has some sort of a website (forums are relatively safe, but still), and that they are required to view this, they should know what they're up against.
As you said, any programmer with two brain cells to rub together could eventually figure out how to get through an unprotected site.  tongue


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#20 2012-05-21 23:36:02

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

I still haven't even put anti-spam protection on my site. I will eventually.

You could also tell them to use COPTCHA or send an automated email to them, to see if they are a computer or human.

And, for security if their host allow them to, tell them to use SSL and HTTPS wherever possisble.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#21 2012-06-23 11:19:26

infinitytec
Scratcher
Registered: 2012-01-21
Posts: 500+

Re: ITopic: The small steps on how to secure your online site or community

Very good!


http://scratch.mit.edu/static/projects/infinitytec/2654336_med.png

Offline

 

#22 2012-07-08 22:27:55

Richard2000
Scratcher
Registered: 2010-01-08
Posts: 35

Re: ITopic: The small steps on how to secure your online site or community

Great guide. When is the next version of Bingo coming out?


McZee Lives On!
http://images2.wikia.nocookie.net/__cb20110212180660/childsgames/images/f/fc/Mczee.png

Offline

 

#23 2012-07-09 06:03:04

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

Richard2000 wrote:

Great guide. When is the next version of Bingo coming out?

Thanks!

I have to admit this might be slightly off-topic, so next time maybe post a comment on one of my projects so as not to disturb the forums, but:
I'm working hard on Bingo 2.0 mainly on adding more complete features and fixing many bugs, instead of adding new blocks (albeit still having added a dozen). However my aim is to provide more functionality with the blocks that I currently have by adding intuitive features and more possibilities of adding different arguments.

Two major changes in 2.0, one in the field of programming and one feature, are data types and a brand new mod share browser inside the program.

I do not have an estimated release date, but I don't expect it to be finished before September as I'm going on holiday soon.

Offline

 

#24 2012-09-26 05:42:23

legobob23o
Scratcher
Registered: 2012-06-22
Posts: 500+

Re: ITopic: The small steps on how to secure your online site or community

Bumpity bump! Bump!  smile

Offline

 

#25 2012-10-28 08:23:15

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: ITopic: The small steps on how to secure your online site or community

BUYP
up
your
post


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 
  • Index
  •  » Advanced Topics
  •  » ITopic: The small steps on how to secure your online site or community

Board footer