News for hackers. Stuff that matters.
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by aaronbasssett on Friday July 18, 2014 @06:58AM (#8052422)
Really? I wouldn't trust this with any form of secure communication.

https://ephchat.com/?room=%3C/title%3E%3Cimg%20src=%22http:/...

Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by corobo on Friday July 18, 2014 @10:48AM (#8053284)
works in chat message too, just got redirected to example.com and someone's embedding an audio file using their username so I'm guessing there's just no sanitization anywhere
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by seagrass on Friday July 18, 2014 @11:19AM (#8053476)
1. Open ephchat.

2. Click change name.

3. Paste the following contents and hit enter.

  <img src="#" onerror="javascript:void(function(setVal,sendClick,text){setVal.value=text;sendClick.click();}(document.querySelector('#chatText'),document.querySelector('#chatButton'),'hello'))"/>hi
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by lytedev on Friday July 18, 2014 @11:40AM (#8053628)
And this is why you absolutely never trust user input.
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by bmmayer1 on Friday July 18, 2014 @02:16PM (#8054675)
This has been fixed. Thanks!
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by seagrass on Friday July 18, 2014 @02:56PM (#8054922)
Nice!
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by pjc50 on Friday July 18, 2014 @10:44AM (#8053255)
Judging by the other comments, this is a good example of all the ways not to build such a system.
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by sarciszewski on Friday July 18, 2014 @08:08AM (#8052555)
Where is the server source code? I'm not seeing where messages are stored/transmitted to clients?

Also https://github.com/bmmayer/ephchat/issues/2

Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by joeyspn on Friday July 18, 2014 @09:30AM (#8052884)
It is a simple websockets chat using Firebase...

https://github.com/firebase/firechat

Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by system_32 on Friday July 18, 2014 @10:14AM (#8053115)
You criticized about the random code generation function. Could you explain why it is bad? Though I code, I am no expert and would really like to know.
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by sarciszewski on Saturday July 19, 2014 @02:37AM (#8056874)
This is the offending code: https://github.com/bmmayer/ephchat/blob/ec375c7974ea825f887f...

This is the proper way to do it (h/t @tptacek): http://sockpuppet.org/blog/2014/02/25/safely-generate-random...

mt_srand() + rand() is just hilarious. The md5(uniquid()) thing is a common randomness anti-pattern in PHP projects that needs to die in a fire.

In PHP, a very brief example of the code to achieve the proper way of generating randomness looks like the snippet I posted in the issue.

Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by qeorge on Friday July 18, 2014 @10:34AM (#8053207)
This is misleading - it uses Firebase for the server! How can the OP claim that the server is not storing messages if the OP doesn't control the server?

I have no reason to trust that Firebase isn't storing the messages. Why should I?

Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by mpgarate on Friday July 18, 2014 @10:01AM (#8053041)
Reminds me of a little encrypted chat app I made with a friend a few weeks ago. Ours is intended for two-way communication: http://cifrachat.herokuapp.com/
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by arcameron on Friday July 18, 2014 @12:28PM (#8053902)
For something a bit better, check out https://chat.echoplex.us Or description at https://echoplex.us
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by nullc on Friday July 18, 2014 @07:06AM (#8052438)
uhh. trivial HTML injection, "trust us" security model. lame.
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by joeyspn on Friday July 18, 2014 @09:17AM (#8052819)
This is not secure at all. I expected some kind of XMPP-OTR stuff...
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by asdad on Friday July 18, 2014 @10:33AM (#8053193)
Is firebase even open source? How is this anonymous? Does anyone know what data firebase collects from its users?
Re:Show HN: EphChat – Ephemeral, Anonymous, Encrypted Realti... by alvyHere on Friday July 18, 2014 @09:46AM (#8052967)
The text I type to the room is cached locally.