Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 970663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:50:27+00:00 2026-05-16T02:50:27+00:00

I plan on having an aspect of my site where the users can submit

  • 0

I plan on having an aspect of my site where the users can submit HTML, CSS, and JS, which is then generated ‘live’ into full working pages of HTML. Other users will be able to see this. These pages need to have working Javascript on them.

I understand that’s a pretty major security flaw in itself, but it’s very important this feature is on the site. I had these ideas:

  • No external Javascript files can be linked to
  • jQuery etc. can be included, but only from a trusted CDN (e.g. Google)
  • Certain Javascript functions will be disabled and removed (e.g. eval())
  • Users cannot submit live demo code until they have earnt a certain amount of ‘reputation’
  • User-submitted live demo code must be authorised by an administrator before it goes live
  • No minified code may be used

And passive security measures:

  • Disclaimer, so we’re not held responsible! 😉
  • ‘Report’ buttons in case a user finds something dodgy

So here’s the question: What do you think of this, as a security plan? Will these measures combined be enough to stop attackers? Users will be submitting their code in three seperate inputs – CSS, HTML, and JS – so I will be able to filter and sanitise accordingly, then restructure it ‘live’ for others to preview.

Thanks!

Jack

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:50:28+00:00Added an answer on May 16, 2026 at 2:50 am

    Sounds like a plan, although I imagine its execution is going to be difficult.

    • JavaScript is so flexible a language that it will probably be impossible to filter out all eval()-like constructs automatically.

    • There are also many ways to fetch script files from external domains that are going to be hard to tell.

    • There may be large amounts of code that need manual reviewing.

    Focusing on the reputation aspect of the idea (accepting executable code only from trusted users), and running everything on a cookieless “sandbox” domain separate from the domain you log in to, is surely a good idea.

    There’s always going to be a risk remaining but I don’t see how that risk is any bigger than on any other web site on the internet that provides JavaScript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Gridview which is having 2 columns : plan value and actual
Im having a language selector on my asp.net web site. I plan to do
We're embarking on a project for a client. They plan on having about 50k
I plan to host a site in a shared hosting environment, where multiple developers
I plan to store quite a few pieces of data about my users in
I plan to delete an entire table with over 930,000 rows of data. Which
BACKGROUND : We are giving our web site users the ability to create fundraising
I'm trying to figure out how to connect this line of HTML (which activates
I am having a jpg image something like a plan map.When I click a
I didn't plan project correctly from beginning so I ended up having many SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.