Zend Framework 3 Released!

After 17 months of effort, hundreds of releases, tens of thousands of commits by
hundreds of contributors, and millions of installs, we’re pleased to
announce the immediate availability of Zend Framework 3.

What is Zend Framework 3?

For Zend Framework 2 MVC users, the differences are subtle:

  • Increased performance; we’ve measured up to 4X faster applications under PHP
    5, and even better performance under PHP 7!
  • PHP 7 support.
  • A focus on de-coupling packages, to allow re-use in a greater number of
    contexts. In some cases, this has meant the creation of new packages that
    either split concerns, or provide integration between multiple components.
  • A focus on documentation. Documentation is now included within each component
    repository, allowing us to block contributions for lack of documentation, as
    well as automate deployment of documentation. See our new
    documentation site for the results.

Migration from version 2 to version 3 was at the top of our minds, and we have
provided a number of forwards compatibility features over the course of ZF3
development, and written migration guides
to help you navigate the changes.

If you are already familiar with our MVC, or want to get started with it, we
have created a new version of the skeleton application
that ships with minimal dependencies, and provides a number of convenience
features including the ability to select optional packages at installation, as
well as auto-register components and modules when adding them to your
application. Read more about the skeleton in the documentation.

For newcomers to the framework, we have been working on our package
architecture, and attempting to make each package installable with a minimal
amount of dependencies, to allow usage in any project, from Zend Framework MVC
applications to other popular frameworks such as Laravel and Symfony. All
components are now developed independently, with their own release schedules,
allowing us to ship bugfixes and new features more frequently. This change has
allowed us to tag multiple hundreds of releases in the past year!

The Zend Framework 3 initiatives also included a number of new features,
primarily around PSR-7 (HTTP Message
interfaces) support. These include:

Yes, you read that correctly: Zend Framework now ships with a microframework as
a parallel offering to its MVC full-stack framework! For users new to Zend
Framework who are looking for a place to dive in, we recommend Expressive, as we
feel PSR-7 middleware represents the future of PHP application development.

The release today is a new beginning for the framework, returning to its
original mission: a strong component library, with opt-in MVC features.

Join our community today; we’re available on the
#zftalk Freenode IRC channel, and via our
component repositories (for discussing issues and development).

— The Zend Framework Team —

Look for follow-up posts on this blog soon, detailing some of the new
features!

Source: Zend feed

Zend Framework 1 End-of-Life Announcement

With the release of Zend Framework 3, it’s time to halt development on Zend
Framework 1. As such, we hereby announce that Zend Framework 1 reaches its End
of Life (EOL) three months from today, on 28 September 2016.

Between now and then, we will only provide security fixes, if any security
reports are made in that time frame. Past that point, we will offer custom bug
and security fixes for Zend Framework 1 on-demand only to
Enterprise users of Zend Server.

Additionally, as of today, access to our legacy subversion server is disabled.
If you were using svn:externals to incorporate Zend Framework into your
application, please download the relevant package as listed in our
Zend Framework packages archives instead, or update your
application to use Composer.

If you need assistance migrating your Zend Framework 1 application to Zend
Framework 2/3 or Expressive, Zend offers architecture migration
services
.

If you are in need of Zend Framework 2/3 training, Zend offers both a
Zend Framework 2 Fundamentals course
and a Zend Framework 2 Advanced Concepts course.

Source: Zend feed

Zend Framework 3 Update for 2016-06-02

This is an installment in an ongoing series of posts on ZF3 development status. Since the last status update:

  • ~130 pull requests merged, and ~100 issues closed.
  • Over 30 component releases.
  • Completion of the component documentation migration.
  • Tagging of zend-mvc 3.0.
  • Completion of the new skeleton application and related installers.

Documentation

Since the last update, we managed to complete the migration of documentation to components, as well as publish documentation for all components!

You can view a list of all documented components via GitHub Pages:

Each component contains a link in the topnav to scroll in the component list, allowing you to navigate to other components.

Please help us thank Frank Brückner for the enormous amount of assistance he provided driving this milestone to completion!

zend-mvc 3.0 stability

After copious testing with the skeleton application (more on that below), and prepping components such as zend-test to work with it, we decided that zend-mvc was ready to tag with a 3.0 stable version!

For those not following previous updates, the main goals of the zend-mvc v3 effort were:

  • De-couple from other components. Many components were listed as development requirements and suggestions due to the fact that zend-mvc contained zend-servicemanager integrations for them. We have moved those integrations into the components themselves.
  • Reduce dependencies to exactly what’s needed for a basic zend-mvc application:
    • EventManager
    • HTTP
    • ModuleManager
    • Router
    • ServiceManager
    • Standard Library
    • View
  • Split optional integrations into their own packages. These included:
    • Console integration (now provided via zend-mvc-console)
    • i18n integration (now provided via zend-mvc-i18n)
    • Several plugins had requirements on additional libraries, including:
      • PRG (uses zend-session)
      • FilePRG (uses zend-form and zend-session)
      • FlashMessenger (uses zend-session)
      • Identity (uses zend-authentication)

During the process, we were able to remove around 75% of the code, making the component much smaller, more maintainable, and more focused.

Once zend-mvc was tagged 3.0, we quickly followed up with a zend-test 3.0 release, and stable releases of zend-mvc-console, zend-mvc-i18n, and the various zend-mvc-plugin packages.

Skeleton application

We’d begun refactoring the skeleton application previously, and were able to complete the work in the past couple weeks. The new skeleton:

  • Migrates to PSR-4 directory layout for the shipped Application module.
  • Relies on Composer for all autoloading, including the Application module.
  • Removes all translations. These were of dubious use, and were quite difficult to maintain.
  • Depends only on zend-mvc, zend-component-installer (which automates injecting components and modules into application configuration during installation), and zend-skeleton-installer (more on this below).
  • We removed almost 8000 lines of code, adding only 800!

zend-skeleton-installer is a new Composer plugin that prompts the user during installation to:

  • Decide if they want a minimal install, or want to add optional packages.
  • Prompts for a number of common optional packages, including caching, logging, console integration, i18n, etc.
  • When installation is complete, it removes itself from the project!

Matthew plans to blog on the code behind zend-skeleton-installer in the near future.

You can test out the new skeleton using the following:

$ composer create-project "zendframework/skeleton-application:dev-develop" zend-project

The above will use the new develop branch, and create a project in the directory zend-project.

Finally, we added both an updated Vagrantfile and Docker support to the skeleton, allowing you to start developing in a consistent, de-coupled environment immediately.

For Vagrant, after you’ve installed, execute:

$ vagrant up

For Docker, you will need to use docker-compose; once you have that available, execute:

$ docker-compose up -d --build

With each, we bind your host port 8080 to the container’s port 80, allowing you to visit it at http://localhost:8080/

We’re excited about the new skeleton, and look forward to getting your feedback on it!

Final milestones

We have a few last milestones before we’re ready to announce the completion of the Zend Framework 3 initiatives.

First, because PHP 5.5 support ends at the end of June, we will be releasing a new minor version of all components setting the minimum supported PHP version to 5.6. (Many already have such versions in place.)

Second, now that the skeleton application is ready, we will be migrating our tutorials to a new repository, converting them to Markdown and MkDocs, and updating them to follow the new skeleton and component changes.

Finally, we will be deciding what the zendframework/zendframework package will look like for a version 3 tag. In large part, it becomes unnecessary, as we can ship even the skeleton with a minimal set of components; however, for those who want "everything at once", keeping it around as a metapackage may have value. We’ll be announcing the plans for it soon.

Until next time

If you want to help:

  • Test the new skeleton (see the directions above) and provide feedback.
  • Search for help wanted or EasyFix issues (most of the latter are documentation).

Many thanks to all the contributors who have provided feedback, patches, reviews, or releases since the last update!

Source: Zend feed

Announcement: ZF repository renamed!

As announced last week, today, we have renamed the "zf2" repository on GitHub to "zendframework".

Per the GitHub documentation on renames, existing links will be automatically redirected, and will persist as long as we do not create a new repository with the name "zf2". Redirects occur for:

  • issues
  • wikis
  • stars
  • followers
  • git operations

Update your remotes

While git operations pushing and pulling from the original repository URLs will continue to work, GitHub recommends you update your git remotes to point to the new location. You can do this with the following in the CLI:

$ git remote set-url origin https://github.com/zendframework/zendframework.git

Note the following:

  • Replace origin with the name of the remote you use locally; upstream is also commonly used. Run git remote -v to see what you’re actually using.
  • Valid remote URLs now include:
    • https://github.com/zendframework/zendframework.git
    • git://github.com/zendframework/zendframework.git
    • git@github.com:zendframework/zendframework.git

Composer

Because Packagist points to GitHub, it will seamlessly redirect. Additionally, all sha1s for all commit remain identical. As such, there should be no impact to end-users for the change for existing installs.

We have updated Packagist to point to the new URL as well, so that as users update, their composer.lock files will start pointing to the new URL.

Source: Zend feed

ZF2016-01: Potential Insufficient Entropy Vulnerability in Zend Framework 1

ZF2016-01: Potential Insufficient Entropy Vulnerability in ZF1

We discovered several methods used to generate random numbers in ZF1 that
potentially used insufficient entropy. These random number generators are used
in the following method calls:

  • Zend_Ldap_Attribute::createPassword
  • Zend_Form_Element_Hash::_generateHash
  • Zend_Gdata_HttpClient::filterHttpRequest
  • Zend_Filter_Encrypt_Mcrypt::_srand
  • Zend_OpenId::randomBytes

In each case, the methods were using rand() or mt_rand(), neither of which
can generate cryptographically secure values. This could potentially lead to
information disclosure should an attacker be able to brute force the random
number generation.

Moreover, we discovered a potential security issue in the usage of the
openssl_random_pseudo_bytes()
function in Zend_Crypt_Math::randBytes, reported in PHP BUG
#70014, and the security implications
reported in a discussion on the random_compat library.

Action Taken

We replaced the usage of rand() and mt_rand() with the random generators of
ZF1 implemented in Zend_Crypt_Math().

Moreover, we removed the usage of openssl_random_pseudo_bytes() functions in
Zend_Crypt_Math::randBytes(). This removal is not a BC break for Linux users
thanks to the usage of /dev/urandom as an entropy source. For Windows users,
this can be a BC break if the Mcrypt extension is not enabled.

The following releases contain the fixes:

  • Zend Framework 1.12.18

Recommendations

If you are using an affected version of PHP, we highly recommend upgrading
immediately to Zend Framework 1.12.18.

Other Information

Acknowledgments

The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:

  • Brian Engert of Soliant Consulting, who
    discovered, reported, and proposed a patch for the issue;
  • Enrico Zimuel, who tested the patch and added the patch
    for the OpenSSL usage removal.

Source: Zend security feed

ZF2015-10: Potential Information Disclosure in ZendCryptPublicKeyRsaPublicKey

ZF2015-10: Potential Information Disclosure in ZendCryptPublicKeyRsaPublicKey

ZendCryptPublicKeyRsaPublicKey has a call to openssl_public_encrypt()
which uses PHP’s default $padding argument, which specifies
OPENSSL_PKCS1_PADDING, indicating usage of PKCS1v1.5 padding. This padding has
a known vulnerability, the Bleichenbacher’s chosen-ciphertext attack,
which can be used to decrypt arbitrary ciphertexts.

Action Taken

  • ZendCryptPublicKeyRsaPublicKey::encrypt() was updated to accept an
    additional argument, $padding; the default value for this argument was set
    to OPENSSL_PKCS1_OAEP_PADDING.
  • ZendCryptPublicKeyRsaPrivateKey::decrypt() was updated to accept an
    additional argument, $padding; the default value for this argument was set
    to OPENSSL_PKCS1_OAEP_PADDING.
  • ZendCryptPublicKeyRsa::encrypt() was updated to accept an additional
    optional argument, $padding, allowing the user to specify the padding to use
    with PublicKey::encrypt().
  • ZendCryptPublicKeyRsa::decrypt() was updated to accept an additional
    optional argument, $padding, allowing the user to specify the padding to use
    with PrivateKey::decrypt().

The above changes represent a backwards-compatibility break, but were necessary
to prevent the outlined vulnerability. If you were using
ZendCryptPublicKeyRsa previously, you will likely need to re-encrypt any
data you’ve previously encrypted to use the new padding. This can be done as
follows:

$decrypted = $rsa->decrypt($data, $key, $rsa::MODE_AUTO, OPENSSL_PKCS1_PADDING);
$encrypted = $rsa->encrypt($data, $key); // Encrypted using OPENSSL_PKCS1_OAEP_PADDING

The key may have a value of null in each of the examples above.

The following releases contain the fixes:

  • Zend Framework 2.4.9
  • zend-framework/zend-crypt 2.4.9
  • zend-framework/zend-crypt 2.5.2

This advisory was given the CVE identifier CVE-2015-7503

Recommendations

If you use zend-crypt via either Zend Framework 2 or the
zendframework/zend-crypt package, and are using the RSA public key
functionality, we recommend upgrading to 2.4.9/2.5.2 immediately.

Other Information

Acknowledgments

The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:

Source: Zend security feed

ZF2015-09: Potential Information Disclosure and Insufficient Entropy vulnerability in ZendCaptchaWord

ZF2015-09: Potential Information Disclosure and Insufficient Entropy vulnerability in ZendCaptchaWord

In Zend Framework, Zend_Captcha_Word (v1) and ZendCaptchaWord (v2)
generate a "word" for a CAPTCHA challenge by selecting a sequence of random
letters from a character set. Prior to this advisory, the selection was
performed using PHP’s internal array_rand() function. This function does not
generate sufficient entropy due to its usage of rand() instead of more
cryptographically secure methods such as openssl_pseudo_random_bytes(). This
could potentially lead to information disclosure should an attacker be able to
brute force the random number generation.

Action Taken

The code used to randomly select letters was updated as follows:

  • In Zend Framework 1.12.17, the methods randBytes() and randInteger() were
    added to Zend_Crypt_Math. Zend_Captcha_AbstractWord was updated to use
    Zend_Crypt_Math::randInteger() instead of array_rand() when selecting
    letters for the CAPTCHA word.
  • In the package zendframework/zend-captcha 2.4.9/2.5.2 and Zend Framework
    2.4.9, ZendCaptchaAbstractWord was updated to use
    ZendMathRand::getInteger() instead of array_rand() when selecting
    letters for the CAPTCHA word.

The following releases contain the fixes:

  • Zend Framework 1.12.17
  • Zend Framework 2.4.9
  • zend-captcha 2.4.9
  • zend-captcha 2.5.2

Recommendations

This patch is considered a security hardening patch, and as such, was not
assigned a CVE identifier.

Regardless, if you use one of the word-based CAPTCHA adapters in Zend Framework
1 or 2, we recommend upgrading to 1.12.17, 2.4.9, or zend-captcha 2.4.9/2.5.2.

Other Information

Acknowledgments

The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:

Source: Zend security feed

ZF2015-08: Potential SQL injection vector using null byte for PDO (MsSql, SQLite)

ZF2015-08: Potential SQL injection vector using null byte for PDO (MsSql, SQLite)

The PDO adapters of Zend Framework 1 do not filter null bytes values in SQL
statements. A PDO adapter can treat null bytes in a query as a string
terminator, allowing an attacker to add arbitrary SQL following a null byte, and
thus create a SQL injection.

We tested and verified the null byte injection using pdo_dblib (FreeTDS) on a
Linux environment to access a remote Microsoft SQL Server, and also tested
against and noted the vector against pdo_sqlite.

Action Taken

We added null byte filtering in the PDO abstract component
Zend_Db_Adapter_Pdo_Abstract. We decided to use the abstract component to
prevent null byte injection in all the PDO adapters once we discovered the
situation was not specific to pdo_dblib.

We used the PHP’s addcslashes to sanitize and properly quote null bytes:

$value = addcslashes($value, "{$content}02");

The following releases contain the fixes:

  • Zend Framework 1.12.16

Recommendations

If you use one of the PDO-based adapters in Zend Framework 1, we recommend
upgrading to 1.12.16 immediately.

Other Information

Acknowledgments

The Zend Framework team thanks the following for identifying the issues and
working with us to help protect its users:

  • Chris Kings-Lynne, who discovered and reported the issue against the
    Zend_Db_Adapter_Pdo_Mssql component of ZF1;
  • Enrico Zimuel, who provided the patch.

Source: Zend security feed

1 2 3 4