Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Coding a WebApp Chat.for community

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Sep 2013 15:54 Edited at: 1st Oct 2013 19:54
Hello

i'm current coding a WebChat , aimed for AppGameKit developpers, which already has these few features :


[EDITED 01/10/2013]
Actually :

- Fixed : Notifications are only played(sound) / displayed (Desktop notification) if application has not the focus
- Added : Desktop Message Notifications (only available for Chrome (tested)...) if desktop notifications accepted the first time at login screen ) (can be disabled on the fly for privacy)
- "Send Message as Code" (to easily copy/paste code from chat window)
- Respect local client time
- Nickname Protection (password based)
- Nickname completion with the TAB key (IRC Like)
- Inline Youtube Video Display (automatically detected in URLs in chat window)
- Inline image-by-url Display (as Youtube Videos with a fullsize when clicked)
- Upload images directly in room
- Integrated MP3 Player miniWindow (also detected after URL Click in chat window)
- Sounds alert when new chat message (can be disabled)
- The webapp remembers your last chosen nickname (i am lazy
- compatible with Chrome,Internet Explorer (9/10), Safari/FireFox, (Windows/Mac/Android/iOS) (for mobile devices it needs few changes to be more responsive)



TODO :


- specific "Notify" sound if a message contains your nickname
- Private messages
- user2user File Transfer
- MultiChatRooms
- Custom design for each chatroom and better website integration (iframe for example) if needed
- ...and any other good idea !

Here is the link :

http://agk.box.ht:9000/



--------------
AGK Chat (Alpha)
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 22nd Sep 2013 16:39 Edited at: 22nd Sep 2013 19:57
edit: nice job!

the chat works very well and will be very nice to get help right away with agk q's instead of starting a thread.

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Sep 2013 16:53
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 22nd Sep 2013 19:42
Looks very nice. I'll join it in a few days when I have more of an opportunity. It's worth mentioning that others have attempted similar chats for AppGameKit (one on IRC, and Daniel TGC put up a Web chat as well) but unfortunately they don't seem to draw in many from the community. I like the idea though, there's something more enjoyable about real-time chat than posting to forums all the time.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Sep 2013 20:22
yes i'm trying to get a different approach for a community chat

The login process must be simple. You click, you agree your nickname, you connect.

i will put a screenshot

any idea will be appreciated
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 22nd Sep 2013 20:51
My only problem with a chat interface is that the information sort of gets lots over time.

By this I mean, if someone posts an issue and someone else posts a fix, it isn't something someone else can then search for if they have a problem.

With this forum, I can do a search for a phrase of command and maybe find a thread that has information that is relevant.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Sep 2013 21:32
AL, i agree with you

The forum is the better thing for support. That is not the question

The chat is just an extension for people who wants .. to chat
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 22nd Sep 2013 21:37
The chat seems to work pretty well, there is a slight delay between posting a message and everything refreshing though.

Also, a chat system like this is pretty good if you have a quick question that isn't worth posting a new thred for. Hopefully it will be more active than previous TGC chats though

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Sep 2013 21:58
Quote: "there is a slight delay between posting a message and everything refreshing though"


Really ? it must be less that 1 second (you only see when the server receive your message). for me it's almost instantaneous

but i can fix this slight delay
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 22nd Sep 2013 22:03
its less than a second from when I hit enter....its fine from canada

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Sep 2013 23:03 Edited at: 22nd Sep 2013 23:04
i've fixed something about that to reduce the delay

.

--------------
AGK Chat (Alpha)
AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 22nd Sep 2013 23:41 Edited at: 22nd Sep 2013 23:47
Skip the following if my critique isn't welcome:



I think a chat service may have it's place, but it's propably not going to draw in a lot of people, and it certainly has far more disadvantages and problem issues compared to the forums.

Also, the login method proposed by MikeMax allows very simple impersonation.

Quote: "You click, you agree your nickname, you connect."


Yea, great... I for one would not want to see anyone use my nickname to impersonate me. (I'm already doing a great job of being known as the grumpiest person on the forums, so I need no help with that.) In fact, if you ever see anyone on the chat, who's called AgentSam - then be aware that's not me, because I won't be using it.

On the other hand, if the login method were to be password based, then that would allow the service hoster to capture passwords, and potentially use them to access the users identity on other sites, if the user used the same password for several services.

You know - ultimately I just enjoy these forums the best. I'm the only one here who is called AgentSam, so I'm not worried about someone taking my online identity on the forums. It would be too easy on the chat service. Hell, someone might even impersonate Paul Johnston there and try to get people to send their game projects to him via email or whatever.

Cheers,
AgentSam
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Sep 2013 00:26 Edited at: 23rd Sep 2013 00:45
i'm ok with your critics you're notifying users about security risks ... and you're right but i will explain :

(i must say that i can't read your message without feeling that as an accusation )

so :

- i don't know why you are "whoising" and publishing my dedicated server informations ? i'm not russian and the server is safe (a lot of bots are running at the hoster company every night and warn me if there is a problem and they deactivate the server network if i don't fix the security holes). It's .. a dedicated server


Quote: "On the other hand, if the login method were to be password based, then that would allow the service hoster to capture passwords, and potentially use them to access the users identity on other sites, if the user used the same password for several services.
"


- for the moment, yes you can take every nickname you want. i know that is a "feature" which will be, obviously, added in next versions.

- For the password, for every website , you store only the encoded password .. not in clear text. The application compare the database encoded password with your submitted encoded password. That's why a lot of websites can't remember you your password by email but can only reset your password.

Quote: "
- The obtained information can easily be used to look up
exploits specific to the clients browser or operating
system.
- The users IP could become a target of port scanning.
- Chat services rarely make it easy to share code, images
or other message attachments.
- Hosted by a mostly unknown third party.
- Difficult to write a formatted or structured message.
- Knowing what HTTPD you're using on the webhost, also
allows users to try to hack into the server."


- This application is a XOJO Web app. Which is a compiled application (so only in memory and only a binary in disk). And when i will add password functionnality, it's obvious that the encrypting process will be done at the client side (Javascript) and after, sent to the server.
So if someone is getting your password, it will be obtained directly on your computer, not elsewhere. and if the password was encrypted on the server, I would keep the encoded version (as EVERY website does .. Facebook, google & E-Bank, & co..)

Quote: "- Any client that connects to "agk.box.ht" will reveal
information about their computer to the server admin,
in the HTTP request headers. Such information includes:
* IP address
* Browser version
* OS version
* Language preference
- Since the chat requires javascript, many other details
can be obtained."



For hacking side .. the only thing possible is to have DDoS (and that is more my problem than the users one :p) ... and the compiled webapp can't host more things that i decide. It's not an Apache or IIS server or nginx server ... it's an application which listen to the port directly.

For the informations sent to the server, almost EVERY website are receiving this informations. And try to access a website without javascript actually ... you won't be able to see any website :p




As TGC Forums do, your encrypted password could be saved in local cookies for a quicker logon.

- The provider i use for my dedicated server is a famous french company and a famous and recognized national (and international) telecom provider (maybe the best one in europe) and the datacenter where is my server is at few minutes from me (you told it, in Bezons, near PARIS).



For the moment, the aim of this chat is to get few advices on what could be improved, added, fixed etc ...

And, once the password will be implemented, i will ask you to proxy your connection to see what is sent i have no problem with that.

I only want to try to create a new chat system, which could be, for example, easily integrated in TGC Website from logged TGC users (and so without any password on the chat side ... it's another solution). anyone without a TGC account couldn't access the chat if i put a filter on the referer with an agreed hash code from TGC.


Other thing ?

--------------
AGK Chat (Alpha)
AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 23rd Sep 2013 02:04
Quote: "I must say that i can't read your message without feeling that as an accusation"


It wasn't an accusation. I'm just highly security concious.

Quote: "i don't know why you are "whoising" and publishing my dedicated server informations"


It's public information, which anyone can obtain, is it not?

The information can be used to confirm the reliability of your site (to an extent). So it could be useful.

Quote: "i'm not russian and the server is safe"


Are all russians criminals? (What about NSA?)

Quote: "For the password, for every website , you store only the encoded password .. not in clear text. The application compare the database encoded password with your submitted encoded password."


Quote: "the encrypting process will be done at the client side (Javascript) and after, sent to the server"


I'm fully aware of how to compute a password hash; eg. an MD5 checksum (which is commonly used). But very few websites actually do that. (Even the TGC website fails to employ any amount of security during the login process.)

And on the downside, it's trivial to get the plain-text password based on a hash. (There are even online tools for doing that.)

So, if a cracker gained access to your applications hash database, they'd be able to get the passwords just as easily. (But I will assume that it wouldn't be easy to gain access to the password hashes in the first place.)

Quote: "For the informations sent to the server, almost EVERY website are receiving this informations."


True for most users.

When I'm using Tor they don't know my IP or location, and my local HTTP-proxy rewrites outbound HTTP-request headers -- so any identifying information in the headers is replaced with disinformation. Often I'm also blocking the referer, so the destination doesn't even know from which page I came to the site. Third party cookies and web storage are obviously blocked so that they do not bleed information. This isn't a typical web usage scenario for most users, though.

Quote: "And try to access a website without javascript actually ... you won't be able to see any website :p"


Which doesn't really make it any better, does it? Because it only means that I couldn't use that service without enabling JavaScript. (Which I don't want to do.)

Quote: "As TGC Forums do, your encrypted password could be saved in local cookies for a quicker logon."


Well, the TGC website login isn't using a secure connection either, and they don't compute an MD5 hash for passwords -- they send them "in the clear" as a POST request sent by the login form.

To be specific, the following cookies are set during the initial login phase to the TGC website:
- plS, plT, public_key, public_key2, suid, PHPSESSID

And they do contain hashes, but only after the hashes have been computed on the server side, following the POST action.

SIDENOTE: TGC website is a prime example for insecure login -- it transmits everything in plain-text without any attempt at encryption.

Quote: "For the moment, the aim of this chat is to get few advices on what could be improved"


I understand that. But the sooner you get this critique the better. Now you can factor it into your development.

Quote: "i will ask you to proxy your connection to see what is sent"


I am in no way out to prove that this chat system is a bad idea.

So I don't want to become a security tester for it. I'm just seeing a few problems with it. And the more I talk with you, the lesser those problems seem to become. I begin to realize that I've been paranoid again.

SUMMARY

I think we've covered that there are SOME issues with the chat service, but nothing horrible for a normal user. If you can prevent identity impersonation between the forums and the chat, I wish you success.

It seems to be hosted by a reliable ISP, and you're working to address some of the issues I mentioned earlier, while also adding a layer of security.

Cheers,
AgentSam
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Sep 2013 02:35
i'm agree with everything

i will take all of that into account. don't worry

--------------
AGK Chat (Alpha)
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 23rd Sep 2013 04:16 Edited at: 23rd Sep 2013 04:18
Quote: "I'm fully aware of how to compute a password hash; eg. an MD5 checksum (which is commonly used). But very few websites actually do that. (Even the TGC website fails to employ any amount of security during the login process.)"


I'd argue that very few websites these days store passwords as plain text or in any tangible way that could be used by hackers or server admins to determine one's password. The hashing, salting and encryption occurs server-side before writing the data to the database. With proper salt applied to the hash and using modern algorithms, any rainbow tables or other decryption techniques will be futile. TGC uses a SHA1 128-bit SSL certificate during the authentication process which offers end-to-end encryption, so I don't understand your claim that they employ no security at all.

I empathize with people's concerns over security and privacy (especially in the wake of NSA) but it does seem a bit exhaustive here given it's a simple chat client that doesn't ask any info of us aside from an alias. In this way it is no different than IRC or any other site out there. Virtually every server collects the same header data including IP, user agent, etc, and 90% of all Websites use JavaScript to some capacity (less than 1% of all users have JavaScript disabled).
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Sep 2013 05:19
Personally, i don't want any controversy on this thread, it's not the goal of this.

However, xCept, you're right. it's "only" a chat system and i only want it to be fun to use... but it's also important to make it safer as possible.

And for security reason, i will add a little registration system with password to prevent impersonation over specified VIP nicknames and a trusted nickname color (green) in the chat room. In other words, i will forbid to use few nicknames until they are registered and verified. Once verified (by a forum private message for example), they will appear in green in the chat. Other nicknames will have the ability to register themselves.

If you have static IP, i can also easily add a filter on your nickname with your IP address.

Let me add these features

And, remember that you should not use the same password everywhere

--------------
AGK Chat (Alpha)
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Sep 2013 09:13
Registration system is done and deployed you can now register your nickname with a password (encrypted in database obviously).

Some moderators & TGC Members forum nicknames have been deactivated in the chatroom to prevent impersonation. (if your nickname is asking you for a password and you never set one .. please leave me a private message here

Just to remember ... Nicknames are supporting spaces ...so, for example, "Paul Johnston" is protected ... but not "Paul_Johnston" or anything similar :p The same for "LeeBamber" (protected) and "Lee Bamber" (not protected) ...

have fun !

--------------
AGK Chat (Alpha)
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 23rd Sep 2013 13:40
Hi, I just tried this out on my Tab 2 7.0 and it worked fine for a few minutes then I got logged out; but could still post messages.

I then tried it from my PC, where it crashed IE the 1st time, then worked ok once the page had recovered.

It's cool though, good job

AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 23rd Sep 2013 14:01
Quote: "TGC uses a SHA1 128-bit SSL certificate during the authentication process which offers end-to-end encryption, so I don't understand your claim that they employ no security at all. "


Yea, I stand corrected. That's definately true. A stupid oversight on my part, I was looking at the login page and the POST parameters and the response in un-encrypted form on my local machine. On the cable it was encrypted during the login, like you said.

Cheers,
AgentSam
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Sep 2013 14:40 Edited at: 23rd Sep 2013 14:42
Quote: "Hi, I just tried this out on my Tab 2 7.0 and it worked fine for a few minutes then I got logged out; but could still post messages."


what do you mean by "i got logged out" ? your name didn't longer appear in user list ? if it's the case, i know where is the problem and i will fix it Your tab is using 3G connection or Wifi ?

Quote: "I then tried it from my PC, where it crashed IE the 1st time, then worked ok once the page had recovered."


IE process has crashed ? what version of IE ? What kind of webapp can make a browser to crash ? lol IE pawa :p ... however, tell me if you can reproduce the problem i will try to fix it

Quote: "It's cool though, good job "


Thanks

--------------
AGK Chat (Alpha)
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 23rd Sep 2013 15:12
It said I had left the room, and my name disappeared from the list but I could still post messages (Do you have access to the log? It was about 12:30). My tablet is connected via wifi.

I have as yet been unable to reproduce the problem with IE, I was doing some testing of a website beforehand so I may have had the compatibility settings on or something; however I am running Internet Explorer 10 with all the latest patches etc.

I just noticed now that I have been logged out of chat again but can still post. On the PC this time.

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Sep 2013 15:50
Ok .. the chatroom disconnects you when it doesn't have response from your browser during 10 seconds.

do you have a good internet connection ? are you downloading big files at the same time ?

anyway, i have something to fix to close correctly the chatroom when a disconnection or huge latency is detected

I will also maybe increase the 10s check.

--------------
AGK Chat (Alpha)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Sep 2013 16:05
Quote: "I will also maybe increase the 10s check."

That is a very short interval. It might take someone that long to read and think about a response.

I think 5 or 10 minutes might be a better number.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Sep 2013 16:44 Edited at: 23rd Sep 2013 20:22
no the 10s timeout is not an "inactivity" timeout

The client checks automatically the chatroom every second and update its last timestamp check on the server. if its timestamp longer than 10s (10s without any check from the client) it will drop the user.

you can stay connected few hours without any message (sent or received) withtout any problem theorically (and i have tested that last night . Except if your connection stop to respond during 10 seconds

--------------
AGK Chat (Alpha)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Sep 2013 17:40
Got it. That makes perfect sense.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 24th Sep 2013 19:10
You can now upload images directly with automatic display in chatroom

I also have found that Internet Explorer 10 (maybe version 9 too) is blocking Javascript (and ajax calls) when you browse a file for upload (not the chat's upload window but the windows filebrowser window). So i have increased the latency checked to 60s (passed this delay for choosing a file, you may be considered as disconnected if you use Internet Explorer... i need to workaround this).

--------------
AGK Chat (Alpha)
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 24th Sep 2013 22:43
Nickname completion added with the Tab Key (need to improve it if multiple nicknames start with the same string to loop through them

--------------
AGK Chat (Alpha)
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 30th Sep 2013 18:16
Recently added :

- Feature : Send message as code with line numbers and "Select all code" button to copy it (by ctrl+C in windows or cmd+C on mac)
- Fixed : display local time instead of server time

--------------
AGK Chat (Alpha)
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 1st Oct 2013 18:27 Edited at: 1st Oct 2013 19:54
Last changes

- Added : Desktop Message Notifications (only available for Chrome (tested)..) if desktop notifications accepted the first time at login screen ) (can be disabled on the fly for privacy)
- Fixed : Notifications are only played(sound) / displayed (and now Desktop notification) if application has not the focus

--------------
AGK Chat (Alpha)

Login to post a reply

Server time is: 2024-11-24 19:40:58
Your offset time is: 2024-11-24 19:40:58