Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75693 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52515 invoked from network); 19 Jul 2014 02:15:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2014 02:15:47 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.176 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.176 mail-lb0-f176.google.com Received: from [209.85.217.176] ([209.85.217.176:59968] helo=mail-lb0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/D2-30992-0D4D9C35 for ; Fri, 18 Jul 2014 22:15:45 -0400 Received: by mail-lb0-f176.google.com with SMTP id u10so3104854lbd.21 for ; Fri, 18 Jul 2014 19:15:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=9pJgkKwWI1O4GP3x0IEwsXZxxybhNzFcbTWKKNa22Fg=; b=BMAhlliztVjA7YdQFkNdilxuYsB3+avF6WaXCdefQJSpNcDtqDRn/I/dqxwSyAjN8p rjqDeN2CxzOpiwaDEg/u4ATS7GH37nAunxD8c3obQmsGlxVDtMqTV4NlDERbbU1x6XFG jKTUmArTvHwKpFNyW4558s4dezZWooba9DwL9ziS/l6SjAC8S1ApD4OaG00KZ3M3MV1g Lpbj49Al/Uz8cnXFyRw+kbiRd7iyIzaomeyI2hO+iAHz9TLR6qDpWdxCB64+QCw0A+Ur VauMmUTFq9A/j7PKYsUJLG2B29MUMJV+rkGrfH/pALFMadwP1fki4eTLHzWO6NBeGHr0 d/TA== X-Received: by 10.113.5.5 with SMTP id ci5mr8745791lbd.82.1405736141633; Fri, 18 Jul 2014 19:15:41 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.128.202 with HTTP; Fri, 18 Jul 2014 19:15:01 -0700 (PDT) In-Reply-To: References: Date: Sat, 19 Jul 2014 11:15:01 +0900 X-Google-Sender-Auth: ng1-92cjYCKygV5HNxvdcirGhOg Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11346e5e5f39ff04fe8273f5 Subject: Re: crypt() BC issue From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11346e5e5f39ff04fe8273f5 Content-Type: text/plain; charset=UTF-8 Hi all, On Wed, Jul 16, 2014 at 9:46 AM, Yasuo Ohgaki wrote: > crypt() has BC issue with older systems. > > https://bugs.php.net/bug.php?id=62372&edit=1 > > The reason rounds became 1000 from 10 is hardcoded lower limit for newer > PHPs. > Generally speaking, developer should never use less than 1000 rounds and > better to have > at least few thousands rounds or more, tens of thousands or more is > recommended. > > I would like to make this bug report 'wont fix', since migration is > possible. > > - Developer may use larger rounds and store updated hash when > user is authenticated with old PHP. > - Developer may ask users to reset password if password hash has > to fewer rounds than 1000 (i.e. outdated hash) with new PHP. > > Any comments? > I'm not going to touch crypt(), but password_hash() behavior that truncates byte larger than 72 silently is not good. I made a bug report for this to add E_NOTICE. https://bugs.php.net/bug.php?id=67653 Any comments? If not, I'll add E_NOTICE in a few days. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11346e5e5f39ff04fe8273f5--