Skip to content

Remove Direct Access Checks #508

@lenton

Description

@lenton

I propose the removal of all direct access checks placed at the start of all classes:

<?php defined('SYSPATH') OR die('No direct script access.');

This check makes classes unusable in other non-kohana projects without first having to define 'SYSPATH'. This line of code doesn't conform to the DRY principle since it's repeated a no end of times throughout the kohana core. This removal will make classes that little more cleaner and be another step towards removing all global state.

To still prevent people from accessing class files directly; index.php (or a symbolic link) could be placed in a public folder, or a htaccess file could be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions