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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:49:30+00:00 2026-05-25T10:49:30+00:00

With security in mind is it best to (for codeigniter apps): Have a controller

  • 0

With security in mind is it best to (for codeigniter apps):

  1. Have a controller that checks for POST input and then delegate to private functions.

OR

  1. Have a controller with a bunch of public functions.

My consideration here is if we allow the users to see the URL, they can just use that URL again to do some action. But if we stick with the POST-delegation method, not everyone will be able to customize their own POST info and try to game the system.

But is this really a concern of significance?? Are there any best practices for this type of concern?

Notes: I use a lot of AJAX on the app as well.

  • 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-25T10:49:30+00:00Added an answer on May 25, 2026 at 10:49 am

    Just my personal opinion but I would go with your first option, use POST with private functions.

    I like to keep my Controllers locked down, they are independent and private and are in fact in control! They can instantiate the other ‘service’ classes (e.g. Models and Views), call the public methods in the Models and then push the data in to the Views public vars.

    In my eyes it’s like this:

    • Controller classes are independent (perhaps extending a common base class, but the same could easily be achieved with static methods), they have private methods!
    • Model classes are also largely independent but with, of course, public functions to retrieve and process data!
    • View classes are where you’ll get your public methods to render data to the page etc.

    Just a thought on your AJAX too: I use a custom handler class to serve as a controller and abstraction layer for all AJAX requests. This way you can maintain tighter security over your AJAX access and data!

    hth

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

Sidebar

Related Questions

Question: What is best practice for form submissions while keeping in mind security? This
I have a SQL query that I cant wrap my mind around. I do
Am writing an application that has an emphasis on security with this in mind
The security policy at our client's production environment requires that we use separate connection
For security reasons (I'm a developer) I do not have command line access to
Is there a security risk associated with using the option that copies All project
If you already have a website design in mind and want to just use
I often read that one purpose of a VIEW is security: to allow some
Anyone have suggestions for security auditing of an .NET Web Application? I'm interested in
I fear I may be trying to do something that certain security policies are

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.