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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:10:37+00:00 2026-05-27T21:10:37+00:00

upto my knowledge once a variable is tainted, Perl won’t allow to use it

  • 0

upto my knowledge once a variable is tainted, Perl won’t allow to use it in a system(), exec(), piped open, eval(), backtick command, or any function that affects something outside the program (such as unlink). So whats the process to untaint it?

  • 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-27T21:10:37+00:00Added an answer on May 27, 2026 at 9:10 pm

    Use a regular expression on the tainted variable to pull out the “safe” values:

    Sometimes you have just to clear your data’s taintedness. Values may be untainted by using them as keys in a hash; otherwise the only way to bypass the tainting mechanism is by referencing subpatterns from a regular expression match. Perl presumes that if you reference a substring using $1, $2, etc., that you knew what you were doing when you wrote the pattern.

    Don’t ignore this warning though:

    That means using a bit of thought–don’t just blindly untaint anything, or you defeat the entire mechanism. It’s better to verify that the variable has only good characters (for certain values of “good”) rather than checking whether it has any bad characters. That’s because it’s far too easy to miss bad characters that you never thought of.

    Perlsec: Laundering and Detecting Tainted Data

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

Sidebar

Related Questions

In the following code upto what scope the anonymous array referred by $ref is
I have done database optimization for dbs upto 3GB size. Need a really large
I have a string which starts with //#... goes upto the newline characater. I
SHA512Managed is missing in Silverlight (for Windows Phone 7 CTP SDK), only upto SHA256
In this code, for vector size, n >=32767, it gives segmentation fault, but upto
hello i am going to develop an EHR (Electronic Health Record System) i am
Ok, this may be a silly question, maybe my English knowledge, or just my
I develop some application that has database wery generic so really can't use it
I have a knowledge base for performing validation of my data model. Modification events
please bear with me as I am not good at framing question. and upto

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.