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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:32:46+00:00 2026-06-14T21:32:46+00:00

Are their any security issues regarding the use of class names and/or parameters in

  • 0

Are their any security issues regarding the use of class names and/or parameters in the url?

I have created a simple PHP page router that routes paths, for example:

www.mysite.com/classname/methodname/param1/param2/etc/etc

Are there any dangers in revealing the names of my classes and methods? Or should there be sufficient filtering in the classes methods to make it not a concern?

Also, my AJAX calls would be routed the same way. To ensure a legitimate AJAX call, could I somehow generate a session token that changes each time the call is made. For example, a random number gets generated in the PHP script that is being accessed by AJAX, which is also sent by the call. If they match then its an authorised request. The only problem is how would I get them to match?

  • 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-14T21:32:48+00:00Added an answer on June 14, 2026 at 9:32 pm

    The biggest security concern is that you are not blindly including the class name like:

    require_once('classes/' . $_GET['class'] . '.php');
    

    The above would be a vulnerable example so be sure to validate the class names or any files that you include so as to avoid a Local File Inclusion vulnerability.

    class_exists() won’t be enough. I would validate it first so that it only contains a-z. Then use file_exists, class_exists etc.

    I imagine not all of your classes and methods will be used by the public through the routing, so have some system where you check if the router is allowed to access the specified class and method. This could be done a number of ways, for example derive publicly available classes from a base class e.g. BaseController and check if the class being included derives from that, or just keep your controllers in a separate directory to internal classes, and control access within the class as needed.

    As for revealing your classes and methods – this is not really a concern, in fact it’s how most MVC frameworks work. Make sure you validate everything that comes in as user input.

    For your AJAX suggestion, yes that can be done by storing the token in the session, so that you can check if it matches when the call is made. I don’t think this would add a great deal of security though. Usually AJAX services give the same data that is available on the page anyway.

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

Sidebar

Related Questions

Is their any way can I check in PHP that my brower(s) FF/Chrome/IE/Safari popup
Anyone have any idea how to connect to their FTP server? I am using
Are there any known security issues with compiling against an older JDK? For instance
I've been curious for a while now about the security issues surrounding the PHP
I am currently working with FileMaker and their PHP API, and I have to
Is their any property for enable java script alerts in our webview? In android
Is their any way of counting number of django logins? The last_login field of
Is their any notifier which let's you add specific build in the notifier. Right
Is their any cases in C++ Like these case WM_COMMAND: switch(LOWORD(wParam)) That happen when
In c++ will their be any error if we input an integer containing leading

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.