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

  • Home
  • SEARCH
  • 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 8706679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:40:23+00:00 2026-06-13T03:40:23+00:00

Here is my situation: I have a search page that pulls data from a

  • 0

Here is my situation:

I have a search page that pulls data from a database. Each record shown has a key attached to it in order to pull data from the database for that record. When a link to a document for a record is clicked, this key is added on to the URL using KO data-bind and control is passed to the corresponding MVC Controller.

Here is my problem:

That key is displayed in the URL. I cannot allow that. A user of this website is only allowed access to certain records. It is unacceptable if the user is able to see any record simply by changing the last number or two of the key in the URL. The best solution I’ve come up with so far is to use AES256 encryption to encrypt each key as the search results are processed, then decrypt after the encryption is passed to another controller. This works great except when I get to the environment where HTTPS is used. I get 400 errors.

Am I over-thinking this? Is there a way, using MVC and KO, to mask the key from the URL entirely? Or should the encryption be allowed in the URL even when using HTTPS?

Here are some examples for clarification:

Without any changes to my code, here is how a URL would look:

https://www.website.com/Controller/Method/1234

Using encryption, I come up with something like this:

https://www.website.com/Controller/Method/dshfiuij823o==

This would work fine as long as it works with HTTPS.

One way or another, I need to scramble the key in the URL or get rid of it. Or determine a way to not run a search with the key every time the controller is called.

Thank you all for any help.

  • 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-13T03:40:24+00:00Added an answer on June 13, 2026 at 3:40 am

    Unless I’m missing something really obvious here, can’t you, on the web service side of things, check the if the logged in user has the correct permissions to the record and, if not, don’t show the record?

    This should ideally be done at the searching level so the user doesn’t see any of the files they can’t get access to anyway. And even if they change the keys in the browser, they still won’t have access.

    If there is no membership system, then there’s going to need to be one implemented if you really want to make your site secure. Otherwise, you’re playing with fire. Otherwise, you’re going to need to set your documents to “public” or “private”, in which will still require a database-level change.

    Edit

    If you really need to make your ID’s unguessable, don’t encrypt them, go for something a lot more simple and create GUIDs for them at your database level. Then your URL would contain the GUID instead of an encrypted key. This would be a lot more efficient due to you not having to encrypt/decrypt your record IDs on every call.

    This, however, is still not 100% secure and I doubt would pass PCI Data Security checks as people can still look at (and copy/paste) GUIDs from the query string, just as easy as they could with encrypted strings. Realistically, you need a membership system to be fully compliant.

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

Sidebar

Related Questions

I have an situation here that looks very like a SELECT N+1 from the
Here is the situation: I have a huge data set that I need quick
Here is my situation: I have one table that contains a list of drugs
here's the situation: I have a where in every cell all the area has
Here's the situation I have a webpage which has one drop down called prefer.
Here's the situation: I have a two images that are over 1024 in width
I'm having a bit of a weird situation here. I have a form that
Here's my situation: I have to temporarily downgrade from .NET4 to .NET3.5 for a
Here is my situation. I have a table with below data. Property_name Property_value --------------------------------------
Here is the situation : we have to offer a customer with a web-based

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.