Re: [PHP-DEV] DKIM on messages
On 2019-07-08 15:57, Tim Düsterhus wrote: This will *still* break anything using DMARC, because neither DKIM nor SPF is valid. Anything *not* using DMARC is better off, though. Ideally the email modifications are disabled entirely. The emails can be reliably detected using the List-Id header and filtered based on it. Best regards Tim Düsterhus Hi Tim The suggested method is not modifying the emails as you suggested, unsubscribe links should be handled by adding a List-Unsubscribe header (which almost all major providers use to show inline unsubscribe links) though that needs a one click link which the current link is not (so again a little more work) Im not sure how big of a change that will be (as it will be many people updating filters I assume) but yeah that's a much better way. I assume people must get dmarc reports now as the SPF and DKIM checks will both fail currently ? Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] [RFC] [Vote] Base convert changes
Hi all I have made a PR for 7.4 for just the ignoring invalid input. I will open a similar one for PHP 8. https://github.com/php/php-src/pull/4328 All tests have been fixed for linux, there is one failure for windows which I am looking in to. Voting ends in a few days time so last chance to vote. looks like the negative number part is not going to pass so the PR has not been updated. Link to RFC if you need it - https://wiki.php.net/rfc/base_convert_improvements Any questions please let me know Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] People.php.net
It seems people is down For example https://people.php.net/rasmus Not sure if people are aware Thanks Scott
RE: [PHP-DEV] [RFC] [Vote] Base convert changes
Hi Chu, Its currently coded to treat that as 'ff' so any odd amount of '-' makes it negative, and any even amount is positive. Thanks Scott On 19.06.2019 14:12, CHU Zhaowei wrote: Hi Scott, Could you clarify what will happen if multiple negative sign occurs. I didn't find it in the RFC. e.g. base_convert('--ff', 16, 10) Thanks, CHU Zhaowei -Original Message- From: Scott Dutton Sent: Wednesday, June 19, 2019 3:24 PM To: internals@lists.php.net Subject: [PHP-DEV] [RFC] [Vote] Base convert changes Hi all I have put my RFC base convert changes to vote this morning https://wiki.php.net/rfc/base_convert_improvements Two votes, one to raise a deprecated error in PHP7.4 (raised to exception in PHP 8) when base_convert encounters something it doesnt know how to convert. Second vote is to allow negative numbers, eg base_convert('-FF', 16, 10) would return -255 (this returns 255 currently) Voting ends 3rd July Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] [Vote] Base convert changes
Ah thats brilliant, I will take a look at updating the tests when I split the PR tomorrow Thanks Nikita Scott On 19.06.2019 09:13, Nikita Popov wrote: On Wed, Jun 19, 2019 at 10:06 AM Scott Dutton wrote: Hi Joe, I will have a look at splitting the PR, I am not at a computer where i can code today though so will be tomorrow at the earliest. The Negative numbers will be a fair amount of work to make the tests pass, would this still need to be done if the RFC doesnt pass ? I am happy to do this work if it looks like it will pass, the reasons it fails are outlined in the RFC as BC breaks. The tests seem to test the values which make it fail more than I have seen other code use these values. 887-939 are ignoring invalid input changes, everything else is negative numbers scripts/dev/bless_tests.php can be used to automatically update expected test output. Doesn't work for all tests (those with many manual wildcards for example), but may save you some work. Nikita Hope that helps Scott On 19.06.2019 08:56, Joe Watkins wrote: > There should probably be a PR targeting 7.4 with the implementation > of "Error on ignored characters" as proposed for 7.4, and a PR > targeting master implementing "Error on ignored characters" with > exception change and implementing "Allow negative arguments". > > None of these PR's should cause tests to fail, and where new untested > behaviour is introduced the PR should include tests for that. > > Cheers > Joe > > On Wed, 19 Jun 2019 at 09:43, Scott Dutton > wrote: > >> Hi Joe, >> >> I will take a look at conflicts. The failures are extreme value >> checks >> which are a result of allowing the negative numbers. If the negative >> numbers one passes I will fix all tests and add some more for the >> negative values. The tests fail because of the unsigned -> signed >> change >> (but as you say there were quite a lot of tests). >> >> Would it be easier for 2 prs ? one for each vote ? >> >> Thanks >> >> Scott >> >> On 19.06.2019 08:31, Joe Watkins wrote: >> > The implementation of this does not look ready, there are >> conflicts >> > so I can't test it locally, but last time CI ran there were many >> > failures. >> > >> > Cheers >> > Joe >> > >> > On Wed, 19 Jun 2019 at 09:24, Scott Dutton >> > wrote: >> > >> >> Hi all >> >> >> >> I have put my RFC base convert changes to vote this morning >> >> >> >> https://wiki.php.net/rfc/base_convert_improvements [1] [1] [1] >> >> >> >> Two votes, one to raise a deprecated error in PHP7.4 (raised to >> >> exception in PHP 8) when base_convert encounters something it >> doesnt >> >> know how to convert. >> >> >> >> Second vote is to allow negative numbers, eg base_convert('-FF', >> 16, >> >> 10) would return -255 (this returns 255 currently) >> >> >> >> Voting ends 3rd July >> >> >> >> Thanks >> >> >> >> Scott >> >> >> >> -- >> >> PHP Internals - PHP Runtime Development Mailing List >> >> To unsubscribe, visit: http://www.php.net/unsub.php [2] [2] [2] >> > >> > >> > Links: >> > -- >> > [1] https://wiki.php.net/rfc/base_convert_improvements [1] [1] >> > [2] http://www.php.net/unsub.php [2] [2] > > > Links: > -- > [1] https://wiki.php.net/rfc/base_convert_improvements [1] > [2] http://www.php.net/unsub.php [2] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php [2] Links: -- [1] https://wiki.php.net/rfc/base_convert_improvements [2] http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] [Vote] Base convert changes
Hi Joe, I will have a look at splitting the PR, I am not at a computer where i can code today though so will be tomorrow at the earliest. The Negative numbers will be a fair amount of work to make the tests pass, would this still need to be done if the RFC doesnt pass ? I am happy to do this work if it looks like it will pass, the reasons it fails are outlined in the RFC as BC breaks. The tests seem to test the values which make it fail more than I have seen other code use these values. 887-939 are ignoring invalid input changes, everything else is negative numbers Hope that helps Scott On 19.06.2019 08:56, Joe Watkins wrote: There should probably be a PR targeting 7.4 with the implementation of "Error on ignored characters" as proposed for 7.4, and a PR targeting master implementing "Error on ignored characters" with exception change and implementing "Allow negative arguments". None of these PR's should cause tests to fail, and where new untested behaviour is introduced the PR should include tests for that. Cheers Joe On Wed, 19 Jun 2019 at 09:43, Scott Dutton wrote: Hi Joe, I will take a look at conflicts. The failures are extreme value checks which are a result of allowing the negative numbers. If the negative numbers one passes I will fix all tests and add some more for the negative values. The tests fail because of the unsigned -> signed change (but as you say there were quite a lot of tests). Would it be easier for 2 prs ? one for each vote ? Thanks Scott On 19.06.2019 08:31, Joe Watkins wrote: > The implementation of this does not look ready, there are conflicts > so I can't test it locally, but last time CI ran there were many > failures. > > Cheers > Joe > > On Wed, 19 Jun 2019 at 09:24, Scott Dutton > wrote: > >> Hi all >> >> I have put my RFC base convert changes to vote this morning >> >> https://wiki.php.net/rfc/base_convert_improvements [1] [1] >> >> Two votes, one to raise a deprecated error in PHP7.4 (raised to >> exception in PHP 8) when base_convert encounters something it doesnt >> know how to convert. >> >> Second vote is to allow negative numbers, eg base_convert('-FF', 16, >> 10) would return -255 (this returns 255 currently) >> >> Voting ends 3rd July >> >> Thanks >> >> Scott >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php [2] [2] > > > Links: > -- > [1] https://wiki.php.net/rfc/base_convert_improvements [1] > [2] http://www.php.net/unsub.php [2] Links: -- [1] https://wiki.php.net/rfc/base_convert_improvements [2] http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] [Vote] Base convert changes
Hi Joe, I will take a look at conflicts. The failures are extreme value checks which are a result of allowing the negative numbers. If the negative numbers one passes I will fix all tests and add some more for the negative values. The tests fail because of the unsigned -> signed change (but as you say there were quite a lot of tests). Would it be easier for 2 prs ? one for each vote ? Thanks Scott On 19.06.2019 08:31, Joe Watkins wrote: The implementation of this does not look ready, there are conflicts so I can't test it locally, but last time CI ran there were many failures. Cheers Joe On Wed, 19 Jun 2019 at 09:24, Scott Dutton wrote: Hi all I have put my RFC base convert changes to vote this morning https://wiki.php.net/rfc/base_convert_improvements [1] Two votes, one to raise a deprecated error in PHP7.4 (raised to exception in PHP 8) when base_convert encounters something it doesnt know how to convert. Second vote is to allow negative numbers, eg base_convert('-FF', 16, 10) would return -255 (this returns 255 currently) Voting ends 3rd July Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php [2] Links: -- [1] https://wiki.php.net/rfc/base_convert_improvements [2] http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [RFC] [Vote] Base convert changes
Hi all I have put my RFC base convert changes to vote this morning https://wiki.php.net/rfc/base_convert_improvements Two votes, one to raise a deprecated error in PHP7.4 (raised to exception in PHP 8) when base_convert encounters something it doesnt know how to convert. Second vote is to allow negative numbers, eg base_convert('-FF', 16, 10) would return -255 (this returns 255 currently) Voting ends 3rd July Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Using [ci skip]
Hi Joe Is there any reason why something like the following isnt run instead ? runTests=$(git diff origin/master... --name-only --diff-filter=ACMR -- ':(exclude)docs/*' | wc -l) if [[ "${runTests}" -gt 0 ]]; then ./run-tests.sh fi ~ Which says if the diff contains files outside of /docs then run the tests. Contributors can then forget about the [ci-skip] and gets the same effect This runs on linux but I cant imagine its a big change to make for this to work on windows ? You can tweak the diff command to only run tests when certain sets of files change Thanks Scott On 07.06.2019 15:07, Joe Watkins wrote: Hi Peter, I think it's pretty well known about, but don't think we have it written down anywhere. I could make a note of it somewhere. I think in the case of azure it can be configured but I'm not sure about the others. I'll try to find out. Cheers Joe On Fri, 7 Jun 2019 at 16:00, Peter Cowburn wrote: On Fri, 7 Jun 2019 at 12:09, Joe Watkins wrote: Oh to be absolutely clear, I'm talking about commits that *only* touch these non-source files ... Cheers Joe On Fri, 7 Jun 2019 at 13:07, Joe Watkins wrote: > Hi Marco, > > It wasn't a topic for discussion, it was a request to committers in > php-src. > > We do not need to run CI for NEWS changes, and we can definitely be sure > it doesn't effect the build. > > The same goes for other files like UPGRADING, UPGRADING.INTERNALS ... > > Under normal circumstances these files are not changed by themslves, but > occasionally, we have to correct one of these files and omitting [ci ski] > puts the build behind by up to an hour ... > > Cheers > Joe > > On Fri, 7 Jun 2019 at 13:02, Marco Pivetta wrote: > >> Please avoid doing that: >> >> 1. Commit messages are for humans >> 2. You never know what can break, that's why it's "continuous" there >> (besides religious views around what "continuous integration" means) >> >> On Fri, Jun 7, 2019, 12:51 Joe Watkins wrote: >> >> > Hi all, >> > >> > Just a friendly reminder that when we're committing changes to files >> that >> > do not contain source, test code, or build configuration, it's helpful >> to >> > include [ci skip] in the commit message. Omitting it can put our CI >> quite >> > far behind. Is this documented somewhere? I'm not seeing it in the docs held in php-src, nor a search of the wiki, for example. Also, is this not something that the CI application(s) can be configured to do for us? >> > >> > Cheers >> > Joe >> > >> > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Base convert changes
Hi all, I plan to put this to vote early next week with the two options One vote for the invalid char deprecation for php7.4 and Exception in PHP8 One vote for negative numbers PHP8 only - due to BC concerns Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 7.2.19 Released
Ondrej updated on the 31st (yesterday). The official Ubuntu one (in 18.04 at least) updated on 30th. Both do update pretty quickly usually. Scott On 1 June 2019 18:56:44 BST, Larry Garfield wrote: >On Thu, May 30, 2019, at 11:17 PM, Ryan McCullagh wrote: >> Hi internals group, >> >> I hope you guys are doing well, and it's a pleasure to be on this >> mailing list. I have a question about the PHP upgrade path on Debian >> and Ubuntu. The common recommendation is to use the PPA from Ondřej >> Surý located at https://launchpad.net/~ondrej - Is this officially >> recommended by the PHP Group as well? >> >> Since 7.2.19 is a security release, I am trying to figure out the >best >> way to get the release without compiling it myself. I can of course >> compile PHP and pull in the tag from git, but if someone has already >> solved this problem, I'd love to contribute to their system, rather >> than invent my own. >> >> Thanks, >> Ryan > >If you're on a supported Debian/Ubuntu release, then your best bet is >apt-get update && apt-get upgrade. Done. They're pretty good about >getting security updates out in a reasonable time. > >If you're using a 3rd party PPA repository (Ondrej or otherwise), the >same applies. If your PPA source isn't on-the-ball about security >releases, you need a new PPA source. :-) > >If you're not on a a still-supported Debian/Ubuntu release, stop what >you're doing and get on a current/supported version, stat. > >--Larry Garfield > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Re: [PHP-DEV] [RFC] Base convert changes
Hi Nikita, Derick Thanks for your time looking at this. Not sure if this will sway you either way, Other programming languages do handle negatives correctly, for example (i can add this to the RFC if that helps) Javascript - https://jsfiddle.net/c16b4usp/ Python - https://repl.it/repls/OliveBlushingModem Go - https://play.golang.org/p/aLWg15c00Fy Its interesting that Javascript handles the large value example correctly, the other two error. There is likely a way to handle negatives in a way which also handles the large numbers though I'm not sure what that would be, I am happy to take any suggestions or look further into the engine to see how this could be done. I was planning on two votes, one for the invalid char changes and one for the negative changes. Either way the documentation should be changes to make it clear that either negative numbers or extremely large values will not return the expected value (unless there is a way to avoid both of these?) Happy to make any changes to the implementation as I said in the PR, my C is quite rusty Thanks Scott On 23.05.2019 17:32, Derick Rethans wrote: On Thu, 23 May 2019, Nikita Popov wrote: On Sat, May 18, 2019 at 11:22 AM Scott Dutton wrote: > I have made some changes to base_convert which I feel would be more > consistent with the current PHP (warning when there are errors, and > not just returning the best value it can) > > The RFC has some examples of what will change. > > Currently the code works but a lot of tests fail due to extreme > range's (also mentioned in the RFC) > > If this passes I will fix the effected tests and add some more > covering the new behavior. > > https://wiki.php.net/rfc/base_convert_improvements I definitely agree with the part of the RFC that warns on garbage characters in the string. I'm not so sure about the changes in sign handling. The problem I see is that certain bases (in particular hex) are pretty much never used with an explicit sign, instead they are understood to be in two's complement representation. For example, code like this will currently work: var_dump(dechex(0x)); // string(16) "" I concur with Nikita here. I don't think you should change the sign handling. I think this is something that actually use in real life projects. cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php, or become my Patron: https://www.patreon.com/derickr twitter: @derickr and @xdebug -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Base convert changes
Not sure if I can add and example to the RFC at this point, but I came across another example of this recently. https://gist.github.com/iansltx/4820b02ab276c3306314daaa41573445#file-getlines-php-L9 // bindec() was doing weird things, hence converting through hex first // sttrev() to match endian-ness to expectations; zip file values are little-endian $compressedSize = hexdec(bin2hex(strrev(fread($stream, 4; // compressed size bindec was returning 0 without warning, as it was passed binary data not a binary string. No warning bin2hex actually does the correct translation. a warning here would have at least indicated there was something wrong with the input it was being passed instead of just 0. Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [RFC] Base convert changes
Hi all I have made some changes to base_convert which I feel would be more consistent with the current PHP (warning when there are errors, and not just returning the best value it can) The RFC has some examples of what will change. Currently the code works but a lot of tests fail due to extreme range's (also mentioned in the RFC) If this passes I will fix the effected tests and add some more covering the new behavior. https://wiki.php.net/rfc/base_convert_improvements Let me know your thoughts Thanks Scott -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Wiki permissions
It's exussum Thanks Scott On 10 May 2019 05:26:39 BST, Scott Dutton wrote: >Hi > >Could I get Wiki permissions to create an RFC for > >https://externals.io/message/104618 > >Thanks > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
[PHP-DEV] Wiki permissions
Hi Could I get Wiki permissions to create an RFC for https://externals.io/message/104618 Thanks -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Base_convert changes
On 11.03.2019 10:51, Nikita Popov wrote: Both changes sound reasonable to me. Could you show some examples where the output is going to change due to the zend_ulong->zend_long switch? Nikita Sure! For example var_dump(decbin(9223372036854775807)); would currently show string(64) "1000" After these changes it would show string(65) "-000" var_dump(decbin(9223372036854775806)); would be the same for both showing. string(63) "110" As the code is reused for decbin etc all of the helper functions have a similar effect. Also userland code would look like this currently $converted = base_convert($original, 2, 10); if ($original < 0) { $converted = - $converted; } So anyone who use coded around this will also break. I have pushed some fixed suggested to the PR again all comments welcome, my C is quite rusty so happy to change anything Thanks -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Base_convert changes
Hi, I have just put a pull request together to make some changes to base_convert, the changes are as follows: 1, Allow conversion of negative numbers (fixes https://bugs.php.net/bug.php?id=55393) 2, Raise a notice when passing in invalid chars as input, currently they are just silently ignored Part of the negative number change causes a BC break due to needing to use a "zend_long" instead of a "zend_ulong" this breaks a number of tests, but allows negative numbers to be represented correctly. The PR is here https://github.com/php/php-src/pull/3911/files I look forward to hearing thoughts on this Thanks Scott