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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:06:14+00:00 2026-06-04T09:06:14+00:00

Google’s Webmaster blog wrote some solution on how to prevent Open Redirect Protection abuse,

  • 0

Google’s Webmaster blog wrote some solution on how to prevent Open Redirect Protection abuse, I’ve been perplexed by some of the solutions there for quite sometime, I tried googling but found no results.

  1. Change the redirect code to check the referer
  2. Consider using a whitelist
  3. Consider signing your redirects
  4. Specifically disallow off-site redirects

My guesses on the solution:

  1. Use %{HTTP­_RE­FERER} to do some checking in the url request
  2. Use some regex in the url request to check if the site in the url
    request is within the scope of the regex
  3. Can’t think of any
  4. Can’t think of any

Please let me know if my guesses are correct, and if they’re not please tell me how to do it correctly in PHP or Apache. Thanks!

  • 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-04T09:06:16+00:00Added an answer on June 4, 2026 at 9:06 am
    1. correct, but this is not a reliable approach. HTTP Referrer can be manipulated.
    2. Define a list of URLs which are allowed to be redirected to, compare to this list and cancel redirects to any other URL.
    3. Add a salted hash of the redirect as a redirect param. Before redirecting, check that hash with the request params. If the calculated hash is the same as the hash in the request params, probably no request manipulation is made -> redirect can be executed. This prevents any redirects to be executed unless anybody guesses your hash-generation algorithm (thats why you have to salt it with a secret key).
    4. Cancel all redirects which will lead to any URL that doesn’t contain your website as host. This can be done with a regex as you guessed at 2.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Google Code Search has indexed Subversion and Mercurial repositories, so people can search open
Google have been suspended my android market account. I will get a new one
Google Translate, has some bookmark let for translate with 1 click, for example: javascript:var
Google is not being my friend - it's been a long time since my
Google maps in some region can serve traffic information showing the blocked roads and
Google is failing me on this one. Let's say I have some ECMA script
Google announced via their Geo Developers Blog on April 08, 2011 that as of
Google hasn't been a help.
Google offers a wonderful REST interface for geocoding and reverse geocoding an address. My
Google App Engine is a cloud computing architecture that supports java based web services

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.