Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct access to php script allowed. Add direct access prevention #4

Closed
ghost opened this issue Jun 25, 2015 · 0 comments
Closed

Direct access to php script allowed. Add direct access prevention #4

ghost opened this issue Jun 25, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 25, 2015

That's a beginners mistake, and a terrible bad practice. Add .htaccess file with deny access to php files, or put them outside the root web dir. http://stackoverflow.com/questions/409496/prevent-direct-access-to-a-php-include-file

If I go directly /show.php or news.php or another page around your website I can access direct script.
Examples:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and menu.link = '' AND menu.parent_id = '38' ' at line 23
SELECT menu.id AS menu_id, menu.entry AS menu_entry, menu.link AS menu_link, menu.page_id AS menu_page_id, menu.parent_id AS menu_parent_id, menu.position AS menu_position, page.id AS page_id, page.username AS page_username, page.creation AS page_creation, page.lastModified AS page_lastModified, page.section AS page_section, page.id_newscat AS page_id_newscat, page.title AS page_title, page.description AS page_description, page.subtitle AS page_subtitle, page.body AS page_body, page.foto_filename AS page_foto_filename, page.foto_size AS page_foto_size, page.foto_type AS page_foto_type, page.position AS page_position, page.link AS page_link, page.menu AS page_menu FROM menu LEFT JOIN page ON page.id=menu.page_id WHERE page_id <> and menu.link = '' AND menu.parent_id = '38' ORDER BY menu.position
Array ( [1b2c20294f205f8b9ccee4728f167de6] => Array ( [table] => area [field] => foto ) [90d2f99af8e435906adb29af20666073] => Array ( [table] => users [field] => picture ) [a129a6f8cf7338dd2273d517ca0dd3f8] => Array ( [table] => page [field] => foto ) [ed3f638bfd40c089629d21d7a502f5bd] => Array ( [table] => bc_channel [field] => image ) [2509d60d4341fb06338fde66523a7662] => Array ( [table] => newscat [field] => foto ) [edf2add41de5659b764aab4a53a0f99b] => Array ( [table] => testimonial [field] => photo ) [482127c3606c8c7d37987455800f36f4] => Array ( [table] => iconogram [field] => icon ) [566dbec987a07b550bdd6306704d10ce] => Array ( [table] => background [field] => file ) [f5203408bdc399ef518305eb498a76d0] => Array ( [table] => layer [field] => foto ) [2edfc6c0c44e539523c76f7e88503571] => Array ( [table] => module [field] => file ) [57048e1b631e7aa750016d7157e102c8] => Array ( [table] => doodle [field] => picture ) )

.. and so on

@ghost ghost closed this as completed Aug 27, 2015
@ghost ghost changed the title Direct access to php script allowed. Add direct access prevention please Direct access to php script allowed. Add direct access prevention Aug 10, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants