rfc:random-function-exceptions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:random-function-exceptions [2015/08/22 19:36] – Target 7.0.0 directly ircmaxellrfc:random-function-exceptions [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== PHP RFC: Core Functions Throwing Exceptions in PHP 7 ====== +====== PHP RFC: Random Functions Throwing Exceptions in PHP 7 ====== 
-  * Version: 0.1+  * Version: 1.0
   * Date: 2015-08-22   * Date: 2015-08-22
   * Author: Anthony Ferrara <ircmaxell@php.net>, Aaron Piotrowski <aaron@icicle.io>   * Author: Anthony Ferrara <ircmaxell@php.net>, Aaron Piotrowski <aaron@icicle.io>
-  * Status: Draft+  * Status: Accepted
   * First Published at: http://wiki.php.net/rfc/random-function-exceptions   * First Published at: http://wiki.php.net/rfc/random-function-exceptions
  
 ===== Introduction ===== ===== Introduction =====
-Concern has been raised over the way failure is indicated by several functions in the core that are often used for security purposes. These functions may fail open, allowing execution to continue, potentially compromising the security of an application. Failure of these functions is only indicating failure through a return value that may be inappropriate cast and used or requiring further function calls to check for failure. It is far to easy for an uninformed programmer to be unaware of the potential for failure and the consequences of neglecting to check for failure, so it is imperative that these functions fail closed, so execution cannot continue if the error is ignored.+Concern has been raised over the way failure is indicated by several functions in the core that are often used for security purposes. These functions may fail open, allowing execution to continue, potentially compromising the security of an application. Failure of these functions is only indicating failure through a return value that may be inappropriate cast and used or requiring further function calls to check for failure. It is far too easy for an uninformed programmer to be unaware of the potential for failure and the consequences of neglecting to check for failure, so it is imperative that these functions fail closed, so execution cannot continue if the error is ignored.
  
 The following functions are addressed by this RFC: The following functions are addressed by this RFC:
Line 38: Line 38:
   * Throws ''TypeError'' if zend_parse_parameters fails.   * Throws ''TypeError'' if zend_parse_parameters fails.
   * Throws ''Exception'' if generating sufficiently random data fails.   * Throws ''Exception'' if generating sufficiently random data fails.
-  * Throws ''Error'' if ''$length <= 0''.+  * Throws ''Error'' if ''%%$length <= 0%%''.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
Line 52: Line 52:
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
   * Throw exceptions   * Throw exceptions
 +
 +===== Vote =====
 +
 +This vote will close on 07:00 UTC on Sunday 06-09-2015
 +
 +<doodle 
 +title="Should this RFC be accepted for 7.0" auth="ircmaxell" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
rfc/random-function-exceptions.1440272197.txt.gz · Last modified: 2017/09/22 13:28 (external edit)