« first day (3612 days earlier)      last day (1352 days later) » 

12:16 AM
Win!
 
 
1 hour later…
1:31 AM
I'm working on improving the security of my ImageSecure library (securily handle images uploaded by users) and need some help. There's a trick to hide files inside images. On Windows you do this simply with:

`copy /B image.png+hidden_file.zip newImage.png`.

Looking for ideas on how to detect / prevent this.
Btw I'm already checking images with the fileInfo extension to check if it recognizes such a file as a real image and it bypasses it with flying colors
The only idea I have in mind myself would be to process the image with Imagick and generate a new image. Not sure if Imagick would process the image or if it would remove the hidden file though
 
 
2 hours later…
3:16 AM
@Tiffany congratulations
 
 
2 hours later…
5:14 AM
@Tiffany cool congrats!
 
5:27 AM
STDIN not support Chinese in CLI mode ・ Streams related ・ #80062
 
 
5 hours later…
10:48 AM
Thanks all :)
I honestly wouldn't be where I'm at without r11 <3
 
XMLReader not suppressing warnings ・ XML Reader ・ #80063
 
11:05 AM
@Tiffany CONGRATS, TIFFANY!! \o/ So excited for you!!
 
11:32 AM
@Tiffany Congratz :D
 
 
2 hours later…
1:32 PM
Ohai room
 
ohaithur
 
1:57 PM
morns
 
@icecub The fact that there is random crap in any given file doesn't really matter on its own
Also you should understand what finfo does and what it doesn't do
morns megaman
 
2:12 PM
Morning
 
\o
 
RETVAL_OBJ(&fiber->std); Z_ADDREF_P(return_value); Does that seem correct?
 
@Derick What's slightly weird about setting ZEND_ASSIGN to the line number of the equal sign is that setting a breakpoint there will break after the rhs of the assignment has already been evaluated. Do you think that's acceptable?
 
@Trowski yes though for clarity I'd Just GC_ADDREF(&fiber->std);
 
@bwoebi Thanks. I was considering adding a static Fiber::getCurrent(): ?Fiber method. Not sure how useful that is, other than detecting if you're in a fiber or not.
 
 
1 hour later…
3:40 PM
sigh OK, now I have Travis and Appveyor passing, but not Azure. Seriously?
Can someone help me understand what's going on here? dev.azure.com/phpazuredevops/PHP/_build/…
The errors I'm seeing are things like, apt package could not be installed. Or error messages in tests I didn't touch that seem to have changed their format in ways unrelated to me renaming parameters.
 
@PeeHaa o/
@mega6382 \o
 
ey @StatikStasis
 
@Crell Not sure your change is actually related. Maybe just re-trigger and check if you get the same error.
This definitely doesn't sound like something that should break due to renaming parameters.
Ups, I was actually looking at the wrong line.
The following packages have unmet dependencies:
libpq-dev:i386 : Depends: libpq5:i386 (= 12.4-0ubuntu0.20.04.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
 
Is there a retest button or do I push a whitespace change commit or something?
 
@Crell I would just commit --amend without changes and force push.
 
3:53 PM
Oh, that works??? TIL.
Pushed, we'll see what happens.
 
@Trowski is there a method to handle disconnecting clients in the amphp/websocket-server?
 
@Ekin there's no dedicated method, your yield $client->receive() will return null
 
@Ekin Each Client object has an onClose() method for registering a callback.
But as @bwoebi said, you likely can handle closure after $client->receive() returns null.
 
I have to look into the amp websocket server for some stuff I have coming up, are there some figures somewhere on how many manages it can handle per second?
 
4:12 PM
ah cool, that helps
thanks both
 
@MarkR what metric? packets sent? new incoming connections?
 
Oops, I meant messages per second.
 
ftr in my case I'm not receiving anything and just keeping a count, so I just need to know when they connect/disconnect
 
@Ekin Only sending to the clients?
 
I'm currently handling 10 to 15 thousand per second using Swoole but wouldn't mind giving a websocket server a try at some point
 
4:16 PM
@Trowski yeah, broadcasting
 
@MarkR Should easily be able to handle that sort of load.
http-server can handle 10's of thousands of HTTP requests/sec, websocket messages should be even more.
 
I was just about try this question but really didn't get the question rules:
13
Q: Programming: Minimum steps required to convert a binary number to zero

roger_thatI was working on a programming exercise and was stuck on figuring out the correct algorithm. Here is the problem: Given a decimal number, how many minimum possible steps are required to convert this to zero provided: Change the bit i if the next bit i+1 is '1' and all the other bi...

Given conditions:

1 - Change the bit i if the next bit i+1 is '1' and all the other bits i+2 and later are 0
2 - Change the last bit without restriction
so let's say for the binary "1000" the pattern should be something
 
@MarkR should be on the 50k range per core on a modern cpu (per core = assuming connection distribution via cluster)
 
Operations

1000

i = 0
1001

i = 1
1011

i = 2
1010

i = 3
1011
Or may be "i" is not incremented at all...
any idea on how "i" works in this condition?
 
4:32 PM
@PeeHaa Busy? Could really use your input on the Twitter message if you have a moment today. =)
 
In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically "0" (zero) and "1" (one). The base-2 numeral system is a positional notation with a radix of 2. Each digit is referred to as a bit. Because of its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used by almost all modern computers and computer-based devices. == History == The modern binary number system was studied in Europe in the 16th and 17th centuries by Thomas Harriot...
but really, not sure exactly what you're askin.
 
Did I forget about you? @StatikStasis
 
I know you're busy- just wanted to ::bump:: =P
 
I honestly forgot about it :(
 
No worries, man. I figured I'd wait a few days since you were probably in the middle of some work.
 
4:35 PM
Enabling PHP 8 … First issue: fatal error: undefined function each() - hehe
 
> Since I am planning on creating this $user object at the time of login and wouldn't have those classes available any more on other pages, couldn't I just check whether the $user object has the required permission needed for accessing that page or resource?
 
Looking at the question rules:

1 - Change the bit i if the next bit i+1 is '1' and all the other bits i+2 and later are 0
2 - Change the last bit without restriction

What really is "i" in this case? Do I need to iterate through binary "1000" 4 times to consider "i" or something else?
 
What about just storing the entire user in the session as an easy fix?
As I understand it you are not interested in changing permissions while a session is active right?
 
Correct
 
Just store the entire user object in the session and access it on later pages
That way you always have access to the user and it's permissions
 
4:38 PM
What about the action.php code and the need to have the permissions all listed there, from what I am understanding of the code... or maybe not understanding.
 
Technically you could remove lines 13-17 in the constructor and remove the constants
But that means you have to work with bare strings which is typos waiting to happen
How many do you expect to have?
 
lol... quite a lot.
 
Put a ballpark number on it :)
 
Probably just under 100. There are modules for several departments: transportation, supply orders, manifest systems, admin stuff, retail sales data, various production trackers. It covers a wide range of stuff.
 
I would just write down 100 constants and be glad you can call Action::ACTION_NAMEinstead of having to use strings directly everytime action_name
 
4:47 PM
I understand. Thanks @PeeHaa
 
Erf. No, Azure is still unhappy. Only the I386_DEBUG build, though. https://dev.azure.com/phpazuredevops/PHP/_build/results?buildId=10895&view=logs&j=d08b4992-9a38-5fb7-07af-0ddc5109f80d&t=6680665c-818b-512c-90ed-d46d91df45b0

An apt error, various error messages changing formats (not the ones I touched), something with ArrayAccess?
 
5:17 PM
not sure if this is a server issue, apache issue, something else... I created a test.php file in a public_html folder on a server, but when I try accessing the file in the browser, it says "File not found." and I get a 404 response under Chrome dev tools -> Network
I tried tailing the error log and access log, but neither had anything in regarding the file
 
cmb
5:31 PM
@Crell these apt errors happen often (or even all the time); if in doubt, just ignore them, unless you want to fix this issue generally
 
I don't know how to. Just trying to get this PR as polished as possible so that it can get merged before RC1.
It means the PR is not green right now, even though it was a few days ago. :-/
 
@StatikStasis yo
@Tiffany congrats on the new job, is it for php?
 
5:55 PM
@mega6382 yes, PHP developer :)
though I'm still doing some contract work for another place
the two are unrelated
 
thats really cool, I am sure it will be great for you, best of luck. :)
 
thanks
I'm looking forward to it
my start date is in like two weeks, so I'll have time to continue working on contract stuff, brush up on other stuff, and anything else until then
I need to brush up on JS
 
What's for lunch.
 
I've been craving chicken lately
 
From where?
 
6:01 PM
somewhere good :P
but I can't order anything until my contract job pays me... which they were supposed to do yesterday...
 
My diet consists of mostly chicken.
I hate that when they take their sweet time to pay.
I've had to threaten to take people to court before to get paid lol
 
damn
 
From time to time, you will have to deal with those types of people.
Just make sure you made them sign a contract.
 
6:24 PM
@SalOrozco whenever I have had any problem with my employer paying, I didn't complain much and just quit without notice as soon as I got paid. I live paycheck to paycheck, so someone withholding my hard earned money is a no-go.
@Tiffany shouldn't be problem, mdn is your friend
 
Yeah, that's what I usually do. I rather not deal with ppl like that.
Really you spend that much? Living paycheck to paycheck?
 
hello guys, I don't know if anyone can help me out. came across an issue on a shared VPS I ran a laravel app but it ends up picking up config values form elsewhere. when I try connecting to the database. the only value that changes is the DB_HOST value
 
@SalOrozco not spend, just make that much, I live in a third world country and since my father died in 2012 I also pay for my little siblings and mother
 
6:41 PM
but honestly what is it with employers and always looking for excuses to delay/reduce pay
 
greed, perhaps
 
it really makes you not want to give your best
 
definitely
 
That's great of you mega. I always found that helping those around you, you get more eventually. You get blessed.
 
7:02 PM
@Crell I get the same failure so this is definitely not related to your change. dev.azure.com/phpazuredevops/PHP/_build/…
 
@SalOrozco thanks
@Tiffany I start a new job on Monday too, it is a bit high level, I was given my choice of the job title after some discussion here I chose "VP of Engineering", although I don't have much in regards to leadership skills I hope that I will do well.
 
Read "How to Win Friends & Influence People" is a good book on leadership.
 
Thanks, I have looking for some good resources to help me develop my skills.
 
7:18 PM
If you have audible I can share it with you for free I think.
 
I don't, that's only cause I can't do audibooks, I lose focus and my mind wanders :(
 
I hit it from all angles. Audio books, books, pdf
videos
 
I like videos as it can capture my attention and can keep my focus, I have a kindle so I will try to get the book on there
 
I have found that books benefit me more, and videos are more convenient.
 
yeah, I feel the same
 
7:28 PM
Hamburger sounds really good
 
7:40 PM
That's all I used to eat.
Burgers are my weakness.
 
8:32 PM
@PeeHaa I know random crap inside a file doesn't rly compromise a system. It's more to prevent illegal file sharing than it is about server security. Anyway, for now I'm trying to learn more about image formats. I might be able to rebuild the image, deleting any crap from it in the process
 
Just a fyi finfo is pretty much useless for this as you have noticed. finfo simply uses magic bytes
 
Ye I only use finfo to get the real mime type returned. As not to rely on headers for that
 
cmb
9:28 PM
@IluTov Nikita fixed that :)
 
@cmb Cool :)
 
10:03 PM
@IluTov Breakpoints only happen as a hook on EXT_STMT, so no issue.
I saw your patch coming past, is it merged yet? :-D
 
@Derick Nope, I'm waiting for a review from somebody ^^
 

« first day (3612 days earlier)      last day (1352 days later) »