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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:21:56+00:00 2026-05-26T09:21:56+00:00

I have a custom [AuthenticationFilter] which simply redirects users that are not authorized to

  • 0

I have a custom [AuthenticationFilter] which simply redirects users that are not authorized to access administrative content.

I apply the filter to

[AuthenticationFilter]
public ActionResult Index() {}

But, I also have

    [HttpPost]
    public ActionResult Index(HttpPostedFileBase file) {}

for handling file uploads. Do I need the attribute here?

My gut instinct tells me no. There’s no way to POST a file to the page because uploadButton is blocked from loading by the first method.

The only other security concern I can imagine is a cross site AJAX post, but this shouldn’t be possible or at least is highly unlikely because its an intranet site.

So, is there any reason to apply [AuthenticationFilter] to the file handler?

  • 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-26T09:21:57+00:00Added an answer on May 26, 2026 at 9:21 am

    You can never count on your client-side control (disabling the upload button) from stopping something from hitting your server. End users have complete control over what happens on the client. They can enable controls, remove or modify hidden fields, intercept browser requests, or bypass the browser completely and make their own requests (with any file they want).

    Any place that you have the option to add security on the server you should do it. There is no type of request you can stop by simply using browser controls.

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

Sidebar

Related Questions

I have custom JSP tags that generate some HTML content, along with some javascript
I have made a custom filter that is to fire on every action(request). So
I have custom components which must adjust their text content based on space constraints.
I have custom classes that I currently instantiate within App.xaml as resources. I want
Here's what I have: Custom-made C# CMS where the content is stored in a
I have a few models that need to have custom find conditions placed on
I have custom drupal module. I receive result from a webservice that I need
I have custom SiteMapProvider and RoleProvider that works together properly: IsAccessibleToUser returns false if
I have custom code inside of a SSRS report that needs to get the
I have custom exceptions in my django project that look like this: class CustomFooError(Exception):

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.