Peter O'Callaghan
Thoughts on Development, Magento and Security
  • email
  • twitter
  • Home
  • About
Select Page ...

HTTP composer dependencies

February 27, 2016 Development Process

A recent update to composer added a configuration option secure-http, which is defaulted to true. As the name suggest the setting relates to https. More specifically it errors if you attempt to pull in a dependency over the http protocol. Importantly, this error is triggered by both packages AND repositories. If you are pulling all your dependencies from packagist / github / bitbucket then you might not have noticed this change as it probably didn’t affect you. If you are mirroring your own packages however this may become an issue for you.

Ultimately I feel this was a good idea and I’m happy to see composer pushing secure practices forward. With the arrival of Let’s Encrypt, offering free signed certificates, it’s hard to find a valid reason not to keep your own mirrors secure. If this change caught you by surprise though, and you are currently relying on http, you can disable either per project by running:

Disable per project
1
composer config secure-http false

From your project directory, or globally by running:

Disable globally
1
composer config secure-http false --global

I’d highly recommend switching over to https as soon as possible though. Once you have, don’t forget to re-enable the check to ensure you maintain this standard going forward.

Re-enable check
1
composer config secure-http true

← Magento 2 – Faster composer install
Magento CSRF vulnerability via Adobe Flex →
  • Categories

    • Development Process
    • Magento
    • Sysadmin
    • Uncategorized
  • Tags

    .htacces Apache composer facepalm filesystem magento 2 mod_rewrite security
    • Archives

      • December 2017
      • June 2017
      • April 2017
      • February 2017
      • January 2017
      • December 2016
      • October 2016
      • September 2016
      • July 2016
      • February 2016
      • January 2016
      • April 2012
      • February 2012
      • August 2011
    • Categories

      • Development Process
      • Magento
      • Sysadmin
      • Uncategorized
    • “There are two types of people. Those who can extrapolate from incomplete data.”

    • Contact
    • Home
    Copyright © 2012 All Rights Reserved - peterocallaghan.co.uk