« first day (982 days earlier)      last day (3982 days later) » 

12:00 AM
@Jasper Goodnight
 
@ircmaxell Then I'll make it "read the answer in a little bit, then go to bed and after it has sunk in tomorrow ask Baba about anything you might have missed."
@Baba Thanks. Good night to you as well. (Depending on your time zone, you're allowed to keep that good lying around till it is the right time.)
 
screw it
3
A: Is Blowfish necessary for security token in PHP remember me system?

ircmaxellWell, there are two things that blowfish can mean. The Cipher (two way encryption algorithm) or the Hash (one way hashing algorithm, specifically called bcrypt). But more on that in a bit. So let's look at your assumed advantages. A hacker can't target a specific account by knowing their user ...

 
@Jasper 1:03AM here
 
I'm not answering that question... I just spent a ton of time writing, but forget that
Or maybe I will
0
A: "Keep Me Logged In" - the best approach

ircmaxellOK, let me put this bluntly: if you're putting user data, or anything derived from user data into a cookie for this purpose, you're doing something wrong. There. I said it. Now we can move on to the actual answer. What's wrong with hashing user data, you ask? Well, it comes down to exposure su...

 
@ircmaxell +1 but can be improved
 
12:06 AM
@ircmaxell "That line of thinking has a name: Security Through Security,"
 
Thanks for answering it after all. If the reason you weren't going to is something I said, I'm sorry I didn't mean to.
 
No, was mainly that it's a large part of the same code between that and the other answer I posted
 
@Jasper I would updated later with my over kill version and you would see why i say its overkill
 
@Baba what part?
 
@ircmaxell This helps to generate secured token and autentication but it does solve the problem when an attacker steals victims login cookies and uses it to access the site
 
12:10 AM
which is an unrelated and significant problem that's outside the scope of this question
 
@ircmaxell I did not real the question .... sorry about that :)
 
@ircmaxell I would have thought it was within that scope. I read the question as "What is a proper approach to do this? This is my suggestion and I have these issues, but if there other issues with this I would also like to know how to avoid those." Anyway, thanks. (And now I'm really going to catch some shut-eye.)
 
@Jasper I would update with my own answer
 
@Baba Ok, looking forward to reading it tomorrow.
 
@Jasper have a lovely night rest
 
12:17 AM
Yay! Nuked a password_hash bug! bugs.php.net/bug.php?id=65093
4
 
@ircmaxell wow
 
@ircmaxell that was presumably a typo in your answer I was pointing out "Security Through Security," missing an 'Ob' right?
 
@Danack what are you referring to? It says Security Through Obscurity on my monitor ;-)
 
sorry - must have missread it ;)
 
12:53 AM
Morning.
@ircmaxell , is there easy way to implement PHP 5.5 Password Hashing in c++? I need to use stored hashed passwords with different language.
 
@sectus Those are portable hashes.
 
I didn't know any better. — Mr.Student 4 mins ago
 
12:59 AM
indeed
 
Just sent a "1 week before I go public" email to a maintainer of a large open source project which hasn't fixed a vulnerability in over 2 months... Let's see if it gets fixed...
 
@ircmaxell I told you in advance ... . I'm also quite confident this has been reported to them ca. 4-5 years ago the first time.
 
@ircmaxell , and one last question. Why are you doing this instead of cmp?
    for ($i = 0; $i < strlen($ret); $i++) {
        $status |= (ord($ret[$i]) ^ ord($hash[$i]));
    }
 
1:26 AM
if( function_exists( 'mysqli_connect' ) )
	$wpdb = new wpdb_mysqli( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
@sectus cmp?
 
@ircmaxell , strcmp()
 
clarity?
 
@ircmaxell , are your sure?
 
am I sure about what? ord() ^ ord() is always constant time, and shows precisely what's happening (one character is being compared to another). strcmp() isn't always constant time (it is in our use, but not in general), and it doesn't generally do what we're trying to do
Additionally, it matches exactly what's happening under the hood: lxr.php.net/xref/PHP_TRUNK/ext/standard/password.c#291
 
What the reason of using ord?
 
1:36 AM
turn character into numeral
and preserve type sanity
or at least some notion of it
 
The YUI JS minifier doesn't like my 800kB input file:
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.lang.String.<init>(String.java:208)
at org.mozilla.javascript.Decompiler.sourceToString(Decompiler.java:268)
at org.mozilla.javascript.Decompiler.getEncodedSource(Decompiler.java:97)
at org.mozilla.javascript.Parser.parse(Parser.java:411)
at org.mozilla.javascript.Parser.parse(Parser.java:340)
 
user895378
The inability of __toString() methods to throw exceptions defeats the whole f$&*#ing purpose of having a __toString() method. Stupid PHP.
 
user895378
Consider:
 
user895378
function __toString() {
    $string = @stream_get_contents($this->resource);
    if ($string === FALSE) {
        throw new \RuntimeException; // <-- Can't do this! PHP error triggering is awesome! Use that instead! :(
    }
}
 
user895378
^ Except you can't do that. You have to name it something different. It makes __toString useless for any non-trivial use-case.
 
user895378
2:23 AM
</rant>
 
guys, WTH happens to SO these days
This would only give you fizz and buzz but not the other numbers. when complete it should provide a list that goes 12fizz4buzzfizz78fizzbuzz11… — ximagin 9 mins ago
it makes me so mad
 
@ircmaxell , thank you for your attention
 
@rdlowrey Line 7, Column 8: Stray end tag rant.
 
user895378
[sic] opening <rant> tag omitted out of frustration.
 
Oh, now 2 downvotes
 
2:28 AM
-1: changes well defined semantics of the problem and program. If you're going to fix the bug, you might want to also retain the same desired functionality, especially in this programming challenge... — ircmaxell 8 secs ago
 
@ircmaxell come on - it's a homework
stop feeding people
 
your answer contains literally nothing but code, and a link to where to run it, and you're tellng me to stop feeding people?
 
yep, it doesn't provide complete answer
it requires more work
to do
 
you're the one who just said stop feeding people. And that's exactly what you did. And exactly why you complained about downvotes. I can completely understand complaining about one or the other. But both? Just weird man...
 
@ircmaxell I didn't provide the whole solution
but something that OP could deal with to get what he wants
 
2:30 AM
yet you provided the code for the whole situation and nothing else but.
 
it's not the whole
 
@ircmaxell do you honestly think that answer deserves a downvote?
I always thought DW is for the harmful answers
or for the completely wrong ones
but not for "slightly" "incorrect"
 
@rdlowrey thank 5.2 for that: 3v4l.org/6nKlF
@zerkms it's not slightly incorrect. As a rule I never upvote code-only answers. And considering I do consider your answer harmful, I think it absolutely deserves a downvote. Even if just as the "it's one step down from normal"...
 
@ircmaxell m?
oh god
that's stupid
 
2:36 AM
what's wrong about it?
 
user895378
@ircmaxell Thanks, 5.2! ... Yeah, I periodically want the ability to throw from __toString and each time I get annoyed when I can't. It finally bubbled over into chat :)
 
@rdlowrey I'm very much not arguing... Perhaps for 5.6 I'll dig through it and try to see if there's anything that can be done about it (not sure off hand)
@zerkms that's stupid? Honestly I feel that code-only answers do a disservice to users.
 
?
 
And therefore I usually just ignore them (by not voting at all)
but code-only answers that give the wrong code for the freaking stated problem
 
@ircmaxell then propose on meta to disallow that
 
2:38 AM
That's bad
 
it's not the wrong
 
user895378
I feel like I read something on internals one time about it being really complicated to allow exceptions in __toString and kind of gave up on having support for it.
 
it's intentionally wrong
it's intentionally incomplete
 
@zerkms that's worse
@rdlowrey It's really easy in around 90% of the spots that use __toString. It's the other 10% that are stupid hard
 
What is your attitude about using of exceptions in a domain logic of an application?
 
2:39 AM
@zerkms Am I missing something? What's wrong about the code?
 
user895378
The use-case I really want for __toString exceptions is object-oriented Iterator streams.
 
@Nile it doesn't output numbers apart of Fizz/Buzz
 
user895378
So I don't have to suppress errors all over my code with the c-style fopen/fread/etc functions.
 
@sectus can you elaborate?
 
@zerkms you should also update the codepad version... still wrong there. But -1 removed
I still won't upvote this
Can you please put some explanation into this answer? I know code-only answers are allowed, but come on. Who is this really helping? — ircmaxell 13 secs ago
anyway, good night
 
@ircmaxell , i need function with name action. There is many reasons why this function would not executed. Some of them are fatal, some of them are not.
 
@hakre really digging through those simplexml tags, aren't you?
 
0
Q: CodeIgniter: Is it possible to remove index.php without using .htaccess?

itskawsarSome technical reason, i don't want to use .htaccess to remove index.php from URL in CodeIgniter. I have seen the route section. I also tried with route too as following: $route['(:any)'] = 'index.php/$1'; But it is not working. Is it possible to remove index.php by router in CodeIgniter? T...

please help me to know
 
3:19 AM
What are disadvantages of using exceptions in domain logic?
 
@sectus That you (tend to) use Exceptions for cases that are not exceptional.
 
@hakre , i can call some of my domain cases Exceptions. :^ ) What about: readability, scalability or something more?
 
@sectus In the domain logic?
 
yes.
 
Well, what do you want to use Exceptions for then? To signal some state of the Domain?
Please vote on this synonym :) - stackoverflow.com/tags/simplexml/synonyms
before it disappears.
 
m59
3:34 AM
SELECT * FROM users INNER JOIN users_access on users_access.owner=users.id and users.id=0
I'm only getting users_access row
Shouldn't I be getting a row from both tables?
Or should this be union?
 
4:09 AM
@hakre , yes domain (or business) logic...
 
m59
SELECT * FROM a, b
WHERE b.foo=a.bar
AND a.bar=1
In phpmyadmin, I get a row from each table
from php, I get only the row from table b
I bet it's putting it all into one array and overwriting table 1's info
 
@m59 , show your fetch code
 
m59
@sectus it is definitely that I am overwriting the info $result['id'] exists in both tables, so it gets written twice.
I'm trying to figure out how to separate them
 
4:30 AM
@m59 , show your fetching code.
 
m59
dude it's cool. PDO::ATTR_FETCH_TABLE_NAMES that's what I need.
 
anyone know what |= means?
 
@m59 , what if your are using one table twice in one query?
 
m59
You lost me on that one haha.
 
can't find the mirror of
left down arrow :)
 
4:41 AM
⬎⬏⬐⬑
 
ohh I get it now, is the carriage feed, there's no opposite of it :P thanks for that paste
 
@DaveChen , better one: ⤴⤵⤶⤷
 
just used the letter V instead :D
0
Q: Selecting random triplicates (or more) from database

Dave ChenI have two tables: Students Student_Grades V------------------------V +----+------+ +----+------------+---------+-------+ | id | name | | id | student_id | subject | grade | |----+------| +----+------------+---------+-------+ | 0 | Dave | | 0 | 0 | Math | 10...

 
mornin
 
@Mr.Alien morning
 
4:52 AM
thanks btw sectus, i get it now
 
m59
SELECT * FROM a
JOIN b ON b.id=a.id
AND a.id=1

SELECT * FROM b
WHERE id=2
can that be combined into one query?
in other words, I need row id 1 from a,b and row id 2 just from b
 
@m59 , UNION may be?
 
m59
nah, it has to be *
 
@YogeshSuthar strange, you are not shown in the room
 
that is strange :P ghost?
 
5:26 AM
Good morning! :)
 
@Mr.Alien I come again :P
 
@YogeshSuthar did you boss sit on your head
?
 
5:38 AM
@Mr.Alien No, but today I think that I should have to work, in last 5 days I am just doing time pass. :P
 
@YogeshSuthar Even I do tp but I cover up pretty well at the end of the day
 
pakk raha hai
 
play game on ipad like i am playing right now.
 
you've iphone and ipad too
 
5:42 AM
its office iPad.
not my personal
and my brother is having iPhone
 
ohhh
 
6:28 AM
morning
 
@NullPoiиteя morning before 1 minute
 
@YogeshSuthar :P
 
Good morning again :-)
 
user652649
@NullPoiиteя sometimes i wonder if people think they can learn just asking questions, without reading any guide or tutorial... i mean... this is "Lesson no. 1 of CSS"
 
user652649
6:38 AM
morning
 
at least they are giving chance to rep-whoring and waste there time :)
 
Indians rock.. how about a question like, I want to make a website like google search, please give me teh codez :p
 
And the answer will be HIRE GOOGLE :P
 
any one wants to helo this guy?
@YogeshSuthar rofl
 
6:43 AM
@Mr.Alien why you are again est Indian ?
 
hahaha lolzzzz I am also going to paste that question @Mr.Alien
 
@NullPoiиteя LOL, I don't like our country, especially the gov
 
@Mr.Alien i like my country ... may be we are facing hard time .. .and yes gov is also a problem now .... but i like my country and believe in constitution
 
what a start for the day, 75... @NullPoiиteя did you saw uttarakhand? if it was other country, the damage would've being 70% less
 
yes i like my state gov .. because it provide free medical and education ...
 
6:48 AM
@NullPoiиteя every state provides for free but lacks quality
 
have you visited uttarakhand ?
 
@NullPoiиteя Yes
last year for chardham
 
@Mr.Alien then you know that its quite hard to rescue ...
army saved like 75000 people ... and still working without caring there lives
@Mr.Alien may be there are more problem in your state .. but my state is quite good and government too
 
6:51 AM
@NullPoiиteя It wouldn't be if you provide amenities from the beginning, we always act after we are affected, you know Taj hotel right? no security previously and now we have police barricades there... so it's lile gov is a baby, it learns only after it is kicked
@NullPoiиteя don't you see india is inflating in terms of money? don't you see $^?
 
@NullPoiиteя @Mr.Alien pls stop this discussion. It will take so many years to build proper country if we discuss like this.
 
yes i do ... i also studied why its going down .... and i only blame people for this
uneducated idiot people are causing bad politics ..
@YogeshSuthar that is why we are at this stage :P
 
@NullPoiиteя blame politician, here we were going to get a new tax, LBT, local body tax, it's like chauhan introduced this just cuz he wanted big shots like walmarts to enter mumbai and all local small retailers shut down, but people protested, all am saying is we have 0 good politician
@NullPoiиteя perfect, we always ignore and than we blame gov
 
@NullPoiиteя @Mr.Alien Instead of blaming others ,we have to do something to change our country.
 
we not that almost every businessman not paying tax properly / selling things which is not allowed /doing piracy ... it they stop ..then every department(including police ) have to work clean
@YogeshSuthar only education can do anything ...
 
6:56 AM
hi , sending email using gmail credentials,without using third party tools
can place links
 
@shankar.parsanamoni good luck
 
i searched a lot but i have not got any useful links @NullPoiиteя
 
@shankar.parsanamoni I didn't got even a bit of it
@YogeshSuthar first you find some tine to learn a new subject, than try to find some time for country, the day you do that, let me know, will create a youth party byp, bhartiya youth party
:p
 
then how can we fix it @Mr.Alien @NullPoiиteя
 
6:59 AM
i hope php has some possibilities ,could show me the path
 
@Mr.Alien we will 1 day. :)
 
@shankar.parsanamoni goo.gl/y1I8W
 
@YogeshSuthar yea, will have a symbol like this <^>(-_-)<^>
 
@NullPoiиteя Most of politician are educated people. Even the top most. But they need black money to feed there belly.
 
@Jeff_Alieffson reload the page :)
 
7:27 AM
Asslamoalikum
 
@MoeedFarooqui wa aleikom elsalam wa rahmato Allahi wa barakatoho
 
7:46 AM
Can you please help us reopen this? stackoverflow.com/q/17268468/1348195
It's not a dupe.
ty
 
morning
 
8:02 AM
good morning!
 
@ircmaxell One more reason not to like the manual salt specification :P
 
hello
i want to get number of visitors of my site
plz help me to get that
 
Hello
@Crazy4Php What have you tried/searched ?
 
@HamZa : google analytics
 
@Crazy4Php so where's the problem ?
 
8:12 AM
@HamZa: i created account in that, add my website, got client id, secret key and redirect url from that, and put them in on ready made code, but yet didn't get any output
 
Well you should say that from the beginning. "getting number of visitors" could also be done with pure php
So you get any error ?
 
@HamZa: but i also need unique visitors, number of pages visited, average of pages visited
 
LOL, I reached the repcap for today :p
 
@Mr.Alien no, +15 doesn't count for the limit repcap
( I mean accepted answers)
 
@HamZa I know, but sorry, wrong words, I meant I crossed 200 :p
34 times I've crossed 200, just need 16 more to get a badge
 
8:17 AM
@Mr.Alien nice, 1 more step closer to the legendary badge :D
 
@HamZa that's what I just told ya ;)
 
@hamza: u checked?
 
@Crazy4Php too much work, should I google that 4 u ?
 
@hamza: thank you so much if u can, plz help if you get anything
 
Correct me if Im wrong please
public static function getUsers(){ ... }
vs
public function getUsers(){ ... }

I can call the static one as : getUsers() and the other one as UsersClass->getUsers(); ?
 
8:24 AM
$class::getUsers()
 
Ok. :-)
 
Good morning!
 
Hi @dragon112 ;)
 
Yo :)
 
$class:getUsers is then the not-static one? ( @WeldanJamili )
 
8:25 AM
@dragon112 morning
 
all :)
 
Hey ^_^
@Duikboot so you are starting your new project today? :)
 
@Crazy4Php I would think that you should copy a piece of code in your scripts and then log in into your google analytic account, from there you should view an overview of your visitors
 
@Dragon112 jup :)
 
8:29 AM
Thanks! :-)
Makes sense
 
@WeldanJamili Wait you need an instance to call a static method? Doesn't that defeat the purpose of static methods/ variables?
 
monring yo
 
yoyo
 
I'm not sure I agree with the closing of this question as too localized. Maybe the phrasing was too specifically geared towards my own situation, but the underlying question relating to php mail forms and whether $body content has to be sanitized is one that I feel is not adequately answered elsewhere. — Jess 2 hours ago
 
8:32 AM
no idea. which one worked for you? hehe
 
@HamZa Hmmm the question that is linked in the comments is pretty much the same isn't it?
 
@dragon112 Yeah, but it's somehow not very complete ?
 
Well yea, I guess so..
The answer is pretty complete isn't it?
Or it is for header injection at least
 
8:39 AM
Yeah, but I mean isn't there an answer that covers almost everything (like spam, bots, html/code injection etc..) ?
But maybe this isn't in SO scope ...
 
Hi im trying to commit an application to GIT
 
The question is quite specific to header injection
 
Why doesn't it work if I try to do the following?
git commit -m "Added foo to the bar"
 
"Is this code safe from email header (CC/BCC) injection?"
 
@dragon112 indeed, so the wording is not right
 
8:40 AM
NVM got it working
git push
did the trick :p
 
@HamZa dupe would have been better.
 
@PeeHaa You're now in the mon-ring group on github
 
@Jimbo lol that guy will ragequite if we close it again
 
@HamZa I hope so >:P
 
@Jimbo ow yeah
 
8:49 AM
@Jimbo ebil jimbo ;)
 
Apparently I've "already voted" on that one, yet I don't see a Close(1) on it...
 
@Jimbo It's actually quite off-topic..
 
How much questions are we closing per day ?
(approximately)
 
Well I'm voting on about 40-50 each day
 
same
 
8:52 AM
@SalvadorDali I don't agree with that, we at the PHP room are closing maybe at least 50 questions like that per day. — HamZa 22 secs ago
 
@HamZa Don't put that on the post, it'll get him in here to talk to us!
 
@Jimbo So, remove the link ?
 
Just the PHP chat room bit
I can't remove it, lol
As soon as Panique sees that, he'll jump into our base of operations and hell will be unleashed!
 
@SalvadorDali I don't agree with that, we at the PHP room are closing maybe at least 50 questions like that per day. — HamZa 2 mins ago
 
@HamZa Lol @ secret team xD
 
8:54 AM
Lol, secret team
 
@Jimbo Lol he'll go on meta xD
 
haha
 
Let 'm come! We outnumber him
 
@Jimbo Offtopic right ?
 
But he's one of those people that will never back down - it took ages to get him to use ircmaxell's password_compat in his crappy login code on github, massive debate ensued before he finally did it
@HamZa Yeah, ot
 
8:56 AM
Yea, that's SuperUser material.
 
done
3 CV's to go !
 
Me too
I voted on that question before it was cool Hipster
 
@Jimbo I think you maybe can't CV twice on the same Q
 
Yea you probably cv-ed on one of the earlier closes
 
I did CV the first earlier one
Ah well...
 

« first day (982 days earlier)      last day (3982 days later) »