« first day (1841 days earlier)      last day (3123 days later) » 

ThW
12:00 AM
You can implement that on the application level, but it will be a lot of work (reacting to unexpected status).
 
@PeeHaa don't you have a close hammer?
 
Abe
@ThW i'm not understanding, can you make me an example of concurrent requests that a db can't handle?
 
The main point is that writes need rw locks. So, while only reading, you can do it in parallel, though, when you write, everybody else (readers and writers) needs to wait until you're finished writing.
 
ThW
And mostly, If you have a performance problem with session locking you have other problems.
 
12:04 AM
@Danack the hammer is just for dupes…
 
@Danack I have a whiskey in front of me. Does that count? :P
 
@bwoebi Let's create a canonical stupid question then!
 
lol ^
 
@Danack \o/
 
Abe
@bwoebi are you saying that you can't do write locks with a db?
still not understanding :B sorry
 
12:07 AM
> Generic too localized question
This question exists for the sole purpose of being able to closehammer questions immediately, even for questions where no duplicate exists.
 
ThW
@Abe Does you dbms support locking a record (session) independent of the client connection and if how it is cleaned up if the client does not unlock it?
 
@Abe I am not? I'm just saying that you should not only prevent writes, but also reads, while you are writing.
 
@Abe It's just a pain in the arse to do. And getting it performant is an even bigger pain in the butt. Oh yeah, and you need to cater for requests just dying without doing the unlocking....
 
Bitches love deadlocks
 
@Danack no problem… use Aerys (session object calls unlock in case it was prematurely destructed in open state).
 
Abe
12:09 AM
@bwoebi correct. you can do that with an acid dbms
 
yep.
 
hELLO
 
@Abe I did acid once or twice.Didn't help bruv :P
@AndreFerraz o/
 
Abe
ahaha
 
Is there a private chat?
 
12:11 AM
There is not an actual private chat, but in here it would do. Let me grab your github
 
@AndreFerraz you can open a separate room… but it'll be all publicly readable.
 
Thanks for taking the time PeeHaa
 
np
When I am following the path of for example logging in to your application I will first hit this
Which is turn hits this
 
Yeah
 
Which in turns hits this code eventually ` $this->_pdo->prepare("SELECT $columns FROM $table WHERE $condition");`
 
12:14 AM
Yes thats right
 
All of the above will result in the following query:
SELECT $columns FROM $table WHERE username='' OR 1=1--'
Because ' OR 1=1-- is totally what I am going to use as username when using your login form
 
But doesn't the prepare function deal with all of that?
 
Nope. Preparing queries is half the solution. You need to actually bind parameters
In this case $username
Your login query should actually read something like SELECT $columns FROM $table WHERE username=:username
And your execute statement should read:
$query->execute(array('username' => $username));
(Assuming both $columns and $table are safe)
 
Hmm thats true
Also you said its not really oop. How is that statement true?
 
My experience of sql injs is that they mostly are useless. It's not like you could append your custom query after a semicolon…, SELECTs are nice, but don't give you any chances to change anything… there's just very few tables containing sensitive information… union selects are nice, but too often just one single row is shown…
and code doesn't contain that many update queries, especially not in the sensitive tables like where your admin status is noted.
 
12:21 AM
@AndreFerraz Let me try another angle
 
Please tell me how its not OOP, I just want to understand ...
 
@PeeHaa that was an objective analysis… but truth is, there just has to be one single wrong query not correctly protected. Code often enough is full of vulnerabilities, but they're rarely exploitable.
 
@bwoebi What scares me is that you cannot see how selects are just as bad :P
 
@PeeHaa oh, they are bad, just not as bad. and often can't give you the information you want.
 
@AndreFerraz If you want to do it proper you would for example not do something like github.com/FerrazzzZ/mylib/blob/master/core/classes/…
 
12:25 AM
How would you do it?
 
@bwoebi It's a great way to do for example privilege escalation to get infromation you want
 
@PeeHaa … with pure SELECTs?
 
yes
 
how can you do a privilege escalation with SELECT?
 
@AndreFerraz if you do it like that you are basically saying to the end users of your application "use me in you code in the following way:"
class SomethingThatneesDb {
    public function doSomething() { $db = Database::getInstance() }
}
@bwoebi Hold on my characters/m has slowed down because of booze
 
12:28 AM
No no no, that doesn't work like that in the code I did
 
@PeeHaa mhm?
 
@AndreFerraz No you didn't because you said a User is a Database. Which is also rater strange
Are you a database? :P
 
Basically when you extend something you have a is a relationship
 
That singleton pattern was just for show purposes. This was a university project so I had to kind of show off
 
12:30 AM
So when you say https://github.com/FerrazzzZ/mylib/blob/master/core/classes/User.php#L13 You say a user is a database ;-)
707
A: What is so bad about singletons?

Jim BurgerParaphrased from Brian Button: They are generally used as a global instance, why is that so bad? Because you hide the dependencies of your application in your code, instead of exposing them through the interfaces. Making something global to avoid passing it around is a code smell. They violate ...

 
Thats true, I should have not extended it.
 
@bwoebi @bwoebi BAM I am a valid user github.com/FerrazzzZ/mylib/blob/master/core/classes/…
And I only needed a select for it
 
So how would you have used the function of the database in the user class?
 
@AndreFerraz Something like this stackoverflow.com/a/11923384/508666
 
@PeeHaa meh, I thought something more arcane like getting a Linux shell etc.
 
12:34 AM
lol nope :P
 
Procedural ... Hmm not my type
 
@PeeHaa as said, that's really just when the wrong query isn't correctly escaped.
 
> My experience of sql injs is that they mostly are useless.
Your experience sucks :P
 
I've seen many framework that do in a similar way
 
@AndreFerraz What's procedural?
 
12:36 AM
not object oriented.
 
What isn't?
 
@PeeHaa I said mostly… At least most sites with crappy code had the one or other query not correctly protected, but very rarely during login…
 
Procedural is based upon the concept of the procedure call.
The answer you gave
the database part
 
@bwoebi Do you ever check SO main? :P
 
I prefer using it in a class and implement my logic. I can easily fix the little mistakes with my code
 
12:38 AM
@PeeHaa I said crappy, not abysmal.
 
@AndreFerraz I don't get you?
@bwoebi hehehe
The point of the answer is to inject the database thing into the user class. or probably rather a mapper @AndreFerraz
 
How old are you if you don't answering that
 
31
 
Anyway, a common vulnerability is when people read values from db, think of them as trusted values and write them back… like a text field you write to backup and back… happens quickly to not escape it there then.
 
well i feel so good
because your literally 15 years older and I know this much already lol
am joking your 10 years older
Thanks for the advice
I appreciate glad you took some time to explain stuff
 
12:42 AM
@bwoebi Same thign for XSS. People tend to forget about things once it doesn't directly come from the user
 
@AndreFerraz well, measure it on time invested, not age… There are also people who begin only much later with coding…
 
@AndreFerraz Yeah. Again I don't want to pick on you or your code specifically in any way and I'm glad you didn't take it the wrong way :-)
 
@PeeHaa yup… you know the solution? apply htmlentities before inserting into database!!
 
lol that is so wrong I actually lolled about that one
You just won the internet again :P
Sad thing is PEOPLE FUCKING DO THAT
 
Yeah I literally started programming last year. So I do not take it as offence when someone say my code is shit lol .. I just want to learn and be better than everyone else :D mistakes make me better
by the way anyone here plays dota?
 
12:45 AM
Not sure. I think I might have seen dota posts in here before at some point
 
@PeeHaa yea they do… and it even works for them… And well… yeah, you html_entity_decode() then in case you need it as raw text obviously.
 
:P
Shoot me now
 
fires shots, misses.
 
Anyways thanks for your critics, honestly I appreciate it. night night
 
Later @AndreFerraz o/
 
12:47 AM
do you have a git account by the way?
 
Sorry, you have to continue existing in this world full of abysmal code :-) @PeeHaa
 
want to follow you for reference
 
@AndreFerraz github.com/PeeHaa (be prepared for a lot of unfinished projects) :P
 
lol I'll judge you if I see shit code lol :P
 
12:49 AM
I don't expect anything less
 
hehe xD
 
:-)
 
Anonymous
I unfollowed @PeeHaa in protest of his unfinished commentar project
 
Anonymous
feels good
 
@Abe You lost some weight I see :D
Good for you :P
@samayo Just wait till my git platform is finished and I will tell everybody you unfollowed me on github when I get filthy rich of the project! :p
 
Abe
12:51 AM
@PeeHaa i also took dancing lessons... and you didn't even notice
 
hehehe
 
Anonymous
@PeeHaa Okay, I apologize :D
 
Too late...
 
Anonymous
> git platform
 
Anonymous
Is that another new project?
 
12:57 AM
You don't know about it yet? Damn son, you have not been paying attention. I have been whoring about it on chat for a while now. Let me try to search in transcript and give up
Holy shit. I actually found something in chat search
 
Anonymous
Isn't that Gogs?
 
Nope that is my git platform. But nice of you to notice I took "inspiration" for the gogs gui :P
 
@PeeHaa is that… a rip-off of github?
 
@bwoebi How is it a ripoff of github?
 
Anonymous
"Inspiration" is that the new word for stealing now? :D
 
1:01 AM
@samayo shh
 
@PeeHaa or is is just another interface for github?
 
@bwoebi It's self hosted
 
@PeeHaa and what are you going to do with this gihtub clone now?
 
In both ways you can interprete it
 
Anonymous
@PeeHaa I hope it is 100% made with PHP.
 
1:02 AM
@bwoebi Host git projects?
@samayo It is
 
@PeeHaa … I mean, will this be just for yourself?
 
Anonymous
@bwoebi where is the fun in that?
 
@bwoebi Well for now it is because it is under development, but eventually I might release it
 
@PeeHaa now use Aerys for it. I'm interested in how easy it is to transform an existing project into something usable with Aerys.
 
1:06 AM
@bwoebi That could be a possibility. I haven't reached the point yet of that decision. I will put it on some pi's once it's stable and it is a candidate
Now that I think about it it would be nice to have a git server in php @bwoebi
 
@PeeHaa I can tell you that PHP is a bad choice for something computationally intensive like git…
 
Mornings @AnmolRaghuvanshiVersion1.0
 
1:11 AM
@bwoebi Tbh I have no clue yet what a git server actually does so I will trust your judgement on this one :-)
 
Anonymous
We need an operating system written in PHP.
 
@PeeHaa I have no clue either, I just know how to make CPU spikes appear via git.
 
Anonymous
And, I'm working on it
 
@samayo yep, have fun figuring out low-level access to devices, SMI controllers and memory.
 
Liar! That doesn't sound like fun at all!
 
Anonymous
1:19 AM
@bwoebi I wish PHP wasn't made with C, and was itself capable of accessing machine code
 
Anonymous
I would really like to contribute to php core, but I hate C
 
@samayo have fun with Joe's libjit extension.
(not 100% sure what its capabilities are though)
 
samayo working on Operating system alone
 
Anonymous
@AnmolRaghuvanshiVersion1.0 just kidding, even if it was real though I would 'try' doing in with Python.
 
if in php i would like to help
 
1:35 AM
@samayo you must be crazy… just like the creator of TempleOS.
 
Anonymous
I read about that guy last time. I felt bad :\
 
2:32 AM
@Danack The CSS one is awesome
 
 
1 hour later…
3:54 AM
@bwoebi you never tried sqlmap github.com/sqlmapproject/sqlmap ???
you can even use subtle changes on responses to leak small parts of a database character by character
timing attacks are often surprisingly efficient too
 
 
1 hour later…
5:01 AM
morning
 
 
2 hours later…
6:32 AM
@andho @AnmolRaghuvanshiVersion1.0 @marcio @bwoebi @Danack @Machavity @PeeHaa @all hi bro GM:)
@andho @AnmolRaghuvanshiVersion1.0 @marcio @bwoebi @Danack @Machavity @PeeHaa @all Hi bro can you worked on send pushnotification by GCM through php code ?
 
are you out of your mind ?? @lovelight
don't ping people randomly
 
@AnmolRaghuvanshiVersion1.0 ok bro
@AnmolRaghuvanshiVersion1.0 I want to send pushnotidfication to mobile but my code send notification on mobile without message
 
@lovelight yes I just use this library
 
i got it Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 pkg=com.app.gcmtestingapp cmp=com.app.gcmtestingapp/.GCMIntentService (has extras) }
 
@lovelight maybe your code have some issues
 
6:38 AM
@andho you can test my code
@andho I got it result after send message to mobile {"multicast_id":8456594458968168861,"success":1,"failure":0,"canonical_ids":0,"r‌​esults":[{"message_id":"0:1446273416549696%3a1307a8f9fd7ecd"}]}
@andho this is my gcm.php fille please check bro pastie.org/10519433
@andho and my html file pastie.org/10519434
please any one help me :(
 
@lovelight do you really think its a good idea to post that file here?
 
@NullPoiиteя thanks bro :) can you help me bro ?
 
@lovelight NOBODY POST APP KEY ON INTERNET :D
 
yes @NullPoiиteя you are right
 
May 14 '13 at 10:19, by Gordon
protip: calling people "dude", "bro" or "friend" in chat makes you look dumb
 
6:46 AM
can't help you bro. I don't know how to use curl.
 
@NullPoiиteя how to solve this problem bro
?
 
@NullPoiиteя doh!
@NullPoiиteя accept him just the way he is <3
 
i am not that nice person on internet... and i dont mind telling people fuck off ,if they dont respect themselves
 
@lovelight just have to debug your problem kiddo. You can do it too.
@lovelight first divide your problem into smaller problems
then once you have smaller (very specific) set of problems, you can easily find specific answer to your problem
 
6:51 AM
@lovelight btw still lol gcmRegID and api key
 
a very comprehensive debugging guide is here
 
Nullpointer you are nice man :) :D
 
I 2nd that ^^
 
@andho @NullPoiиteя i am learning php just time means i am fresher in php so i have no very knowledge of php . and this is my frist programming in php
@NullPoiиteя i got server key from google developer console
 
@lovelight I think your POST body is being sent wrong. But I don't know curl.
@lovelight use the library I posted above. You will have a better time.
 
6:56 AM
@andho ok thanks let me try:)
 
also CURLOPT_SSL_VERIFYPEER is also not safe.
 
@NullPoiиteя I got regesteredid from gcm
 
moin
 
lol I didn't post the library link.
this library @lovelight
morning Joe
My games are loading super slow since I bought my desktop. Like more than 5 mins :( Game play is fine.
I don't know what to upgrade.
 
7:02 AM
@andho let me try:)
 
0
A: Find when Internal (built-in) Functions and Predefined Constants were introduced (version number) in PHP

Joe WatkinsThe php.net website is not a complete historic reference, it attempts to show you what should be relevant. At some time in the not too distant future, I imagine a lot of the PHP4 stuff will be gone, since there's no sense in talking about PHP4 in the year 2015, and room must be made for PHP7. T...

strange that someone should care how php3 works in 2015
 
@JoeWatkins sad if someone really needed to do that.
 
7:50 AM
hi
I have 2 tables say table 1 and table 2 from which I want to fetch only unique matching records . There one-to-many relation in between 2 tables..
Is there any way to fetch only matching one record ?
 
8:08 AM
@JoeWatkins I can't find where $array[] = ... is defined, ie. the read_dimension handler for arrays. What should I be searching for?
 
8:24 AM
@John you can use GROUP BY clause on the id of table 1.
 
8:38 AM
@andho I used that too but no luck
 
8:58 AM
here is the schema sqlfiddle.com/#!9/1cff1/1
in result album_cover as not matching to photo
 
9:35 AM
hi I dont know what is wrong with my code I cant save the path of the updated image in the uploads folder here is my code $file = Input::file('attachment');
        $name = time() . '-' . $file->getClientOriginalName();
        $file = $file->move(public_path() . '/documents/articles/', $name);
        $article->attachment = $name;;
 
Would have been cool if there was an object handler for "empty"
@ELOISSIFIAhmed do you have the required write permissions?
 
@rt
@rtheunissen yes I did
@rtheunissen let me show u my whole code
 
Hi Chat
 
hi, some one is here?
 
@rtheunissen   public function update($id)
    {
        $selected_post = Article::findOrFail($id);
          $input = array_except(Input::all(),'_method');
             $selected_post->update($input);

           if (Input::file('image'))
            {
                $file = Input::file('image');
                 $name = time() . '-' . $file->getClientOriginalName();
                 $file = $file->move(uploads/', $name);


                $selected_post->image = $name;
                $selected_post->save();
 
9:48 AM
@ELOISSIFIAhmed help me out here, what's going wrong exactly? Are you getting errors? What's happening? I can't guess from the code.
 
i have error here:
<?php
$job1 =' ?><?= $fgmembersite->UserFullName();' ?>
<?php
echo "$job1";
?>
 
@sajad Yes you have.
 
where is problem?
i want to echo username
 
I want to update article's image I used the code I sent to u but I cant find any image on the uploads folder even if it has permissions
 
here is userfullname function that works well:
function UserFullName()
{
    return isset($_SESSION['name_of_user'])?$_SESSION['name_of_user']:'';
}
 
9:52 AM
morniongs
@ELOISSIFIAhmed lemme guess, you are using laravel
 
@ELOISSIFIAhmed what's the content of Input::file('image')?
 
@tereško yes it is
 
.. the SoC violations is what gives it away
 
Cool @tereško is the laravel expert
 
@rtheunissen the requested image from input
@tereško what do u mean ?
 
9:56 AM
In computer science, separation of concerns (SoC) is a design principle for separating a computer program into distinct sections, such that each section addresses a separate concern. A concern is a set of information that affects the code of a computer program. A concern can be as general as the details of the hardware the code is being optimized for, or as specific as the name of a class to instantiate. A program that embodies SoC well is called a modular program. Modularity, and hence separation of concerns, is achieved by encapsulating information inside a section of code that has a well-defined...
 
is there any way to tell an abstract class that the implementation will need to also use a certain trait (beside setting all the trait functions as abstract functions) ?
 
@tereško ok can u help me with this problem ?
 
@ELOISSIFIAhmed I will not
@chozilla no .. also you shouldn't use traits to begin with
 
@ELOISSIFIAhmed @tereško is special he just wants to flame, thats all.
 
will any one attend to my problem?!
 
9:58 AM
@tereško thank you
 
@tereško you should not use php but why are your here then?
 
wut
 
you resemble the chat troll quite well i have to say.
 

« first day (1841 days earlier)      last day (3123 days later) »