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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:34:41+00:00 2026-06-02T15:34:41+00:00

I am passing directly a user defined parameter in my response header. Which I

  • 0

I am passing directly a user defined parameter in my response header. Which I have learned is not a good idea since that way user can manipulate header and it can lead to Cross site scripting attacks and other kind of multiple attacks.

https://www.fortify.com/vulncat/en/vulncat/python/header_manipulation.html

What I am doing for preventing this is validate the user input for “http response splitting” by replacing “\r” and “\n” characters with empty string “”. Is this enough or I have to check for other characters also. Any pointers would be of great help.

This is my code.

if(response != null)
  {
   newResponse = response.replaceAll("[\r\n]", "");
  }

Is this enough for preventing this kind of attack or I should also validate for other characters.

  • 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-06-02T15:34:44+00:00Added an answer on June 2, 2026 at 3:34 pm

    A whitelist is much safer than a blacklist. Whether you can use a whitelist depends on how much you know about the user defined parameter.

    More here:

    http://cwe.mitre.org/data/definitions/113.html

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

Sidebar

Related Questions

I have an app that uses a single-user OAUTH token. I can store the
I have an InstallShield project that invokes an EXE written in C#, passing it
So we have a program that the user can use by copying text from
I have a singleton which stores some prudent information about the user of my
I'm just not that good at regex and I haven't been able to find
passing post data using cURL requires that the name of the input. However, I
I have to make an app for client where there are functionalities best defined
I have a Util module in my VB.NET program that has project-wide methods such
I have a windows forms application that runs two threads simultaneously, with the UI
I'm making an app which has a flow roughly as below: User starts on

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.