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 155197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:06:47+00:00 2026-05-11T10:06:47+00:00

In my application I am allowing users to upload their css style sheets so

  • 0

In my application I am allowing users to upload their css style sheets so they can applied to templates. The css is written as an internal style sheet, because at this time I would not like to expose the css style sheet to other users.

That creates room for users to include malicious code into the css file. Initially my plan was to convert all ‘<‘ and ‘>’, but that is needed in the css syntax. I am after a white list solution, since it won’t be feasible to exhaustively eliminate unwanted characters.

Any suggestions for implementing security measures to this scenario?

  • 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. 2026-05-11T10:06:48+00:00Added an answer on May 11, 2026 at 10:06 am

    You should definitely also filter out at least IE expressions and FF -moz-binding properties… both can be used to run (potentionally malicious) javascript using css.

    This cheat sheet contains the most obvious XSS tactics, including some CSS ones.

    The safest solution would probably be whitelisting as you suggested (if it is acceptable to limit users to only use whitelisted properties).

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

Sidebar

Ask A Question

Stats

  • Questions 157k
  • Answers 157k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer When MarshalAsAttribute.Value is set to ByValArray, the SizeConst must be… May 12, 2026 at 11:02 am
  • Editorial Team
    Editorial Team added an answer NSMutableArray (and all other classes with Mutable in the name)… May 12, 2026 at 11:02 am
  • Editorial Team
    Editorial Team added an answer Well, for this program (pleasse provide correct, compilable examples) #include… May 12, 2026 at 11:02 am

Related Questions

I am trying to make my application more customizable by allowing users to pick
My company is building an ASP.NET HR application and we have decided to create
I'm in the process of porting a large C++ application from Linux (gcc) to
In my asp.net mvc app i am using the activedirectorymembershipprovider. In the active directory

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.