Giter Club home page Giter Club logo

defacto_routeblocker's Introduction

Defacto_RouteBlocker

Restrict access to configured routes on a Magento installation.

Tested with Magento 1.9.x+ but most likely will work with earlier versions.

The module will prevent access to any route specified in the configuration.

Pull requests welcome.

FAQs

How do I find the route name for the URL I'm trying to block?

The route name is basically a fully lowercase version of the value returned by getFullActionName() in the controller. If you want to block a controller action you can temporarily put die(strtolower($this->getFullActionName())); at the top of that action to find what the correct value for the configuration is.

Why did you create this extension?

As a development agency we inherit a lot of code, sometimes from other agencies, other times from 3rd party extensions bought by the merchant. Often times such extension offer some nice features but aren't always written with security or best practices in mind. Sadly, it's not uncommon to find code which allows unauthenticated access to:

  • Trigger cache clearance
  • Trigger re-indexing
  • Expose customer information
  • Insert data into the database
  • Upload files to the server
  • View log information
  • Run arbitrary code

Obviously we don't want such code sitting around on sites we maintain. In an ideal world we would simply remove the extension, but it's not always financially viable to the merchant for us to re-code the existing functionality in a more secure manner. Attempting to patch or rewrite can also be time consuming and make it difficult to update should the original vendor release a new version.

The solution then? Prevent the insecure code being accessed.

Does it have any other features?

Not really. The one and only purpose of this extension is enabling you to block access to controller actions. That being said, there may be non-security related reason for which you wish actions to be inaccessible:

  • Frontend features you don't want the customer to use, but can't fully disable.
  • Backend features with insufficiently implemented ACL you don't wish people to trigger.

defacto_routeblocker's People

Stargazers

Andrew Howden avatar

Watchers

Mike Parkin avatar Luke Rotherfield avatar Peter O'Callaghan avatar James Cloos avatar Nathan Edwards avatar

defacto_routeblocker's Issues

How to write and input "route"

Hello,

Thanks for this great extension. However, I'm a regular user, so please read the following

  1. I don't know who should fill in the "route" part, please give me an example

  2. How to know where the extension needs to be blocked and how to check

  3. I see "Newline separated list of full action names to block", suppose I entered xxxx_xxxx name, need to add any symbols at the end, eg xxxx_xxxx ; ?

Thanks again if you can reply.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.