Download the PHP package migratetoflarum/old-passwords without Composer

On this page you can find all versions of the php package migratetoflarum/old-passwords. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package old-passwords

Old Passwords extension by MigrateToFlarum

Build status MIT license Latest Stable Version Total Downloads Donate

This extension allows your users to continue to login with their passwords from a previous platform that was using a different hashing algorithm than Flarum.

Installation

Updating

Documentation

This extension is meant to be used alongside a migration script. There are no settings accessible from the UI (you still need to keep the extension enabled for it to work !)

The migrations add a migratetoflarum_old_password column to your users table, which can contain old credentials hashed with different algorithms than bcrypt.

This column must contain a valid JSON-serialized object as described below or null to not provide an old password.

Once a user was correctly identified via an old password, the password is re-hashed with bcrypt, stored in Flarum password field and the migratetoflarum_old_password column is set to null.

If you somehow manage to have both a bcrypt-hashed password and migratetoflarum_old_password value in the database for a user, then the user will be able to login with either password. The password used will override the value of password and migratetoflarum_old_password will be set to null.

Compatible hashings

Don't hesitate to open an issue or a PR to suggest a new hashing method. More will be added soon.

While some of these options might be convenient for testing purposes or other shenanigans, some can put your old password's users at risk in case of a breach. These options are labelled with /!\ Insecure. Just as the whole extension, use these at your own risks !

Plain

/!\ Insecure: you can directly salt and hash plain text passwords with bcrypt and store them in password instead.

Example:

Bcrypt

It probably doesn't make sense to store a bcrypt hash here instead of the password column, but it is possible.

Example (password = bcrypt(correcthorsebatterystaple)):

Phpass

Reads portable and bcrypt hashes created with Phpass.

In order to use this type you need to install the hautelook/phpass package:

Example (password = portablehash(correcthorsebatterystaple)):

MD5

/!\ Insecure: with or without a salt MD5 stays weak. Consider using the md5-bcrypt option below.

Example (password = md5(correcthorsebatterystaple)):

Example with salt before the password (password = md5(12345678correcthorsebatterystaple)):

Example with salt after the password (password = md5(correcthorsebatterystaple12345678)):

MD5-Bcrypt

This is the preferred method to import MD5 hashes. You have to run every old MD5 password hash through bcrypt and store the resulting value in Flarum.

Example (password = bcrypt(md5(correcthorsebatterystaple))):

Example (password = bcrypt(md5(12345678correcthorsebatterystaple))):

You can use salts the same way as described for MD5.

MD5-Double

/!\ Insecure: consider using the md5-double-bcrypt option below.

Same as MD5, but the password is hashed a first time before the salt is added.

Example (password = md5(12345678 + md5(correcthorsebatterystaple))):

You can use salts the same way as described for MD5.

MD5-Double-Bcrypt

Same as MD5-Double, with an extra bcrypt layer.

Example (password = bcrypt(md5(12345678 + md5(correcthorsebatterystaple)))):

SHA1

/!\ Insecure: with or without a salt SHA1 stays weak. Consider using the sha1-bcrypt option below.

Example (password = sha1(correcthorsebatterystaple)):

You can use salts the same way as described for MD5.

SHA1-Bcrypt

This is the preferred method to import SHA1 hashes. You have to run every old SHA1 password hash through bcrypt and store the resulting value in Flarum.

Example (password = bcrypt(sha1(correcthorsebatterystaple))):

You can use salts the same way as described for MD5.

SHA1-Double

/!\ Insecure: consider using the sha1-double-bcrypt option below.

Same as md5-double for sha1.

Example (password = sha1(12345678 + sha1(correcthorsebatterystaple))):

SHA1-Double-Bcrypt

Same as md5-double-bcrypt for sha1.

Example (password = bcrypt(sha1(12345678 + sha1(correcthorsebatterystaple)))):

KMD5

MD5-based hash used by Unclassified NewsBoard.

Example (password = first16bytes(md5(correcthorsebatterystaple)) + 12 + last16bytes(md5(correcthorsebatterystaple))):

A MigrateToFlarum extension

This is a free extension by MigrateToFlarum, an online forum migration tool (launching soon). Follow us on Twitter for updates https://twitter.com/MigrateToFlarum

Need a custom Flarum extension ? Contact Clark Winkelmann !

Links


All versions of old-passwords with dependencies

PHP Build Version
Package Version
Requires flarum/core Version ^1.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package migratetoflarum/old-passwords contains the following files

Loading the files please wait ....