Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyone can send message impersonating anyone #3

Open
aaayushsingh opened this issue Oct 27, 2018 · 3 comments
Open

Anyone can send message impersonating anyone #3

aaayushsingh opened this issue Oct 27, 2018 · 3 comments

Comments

@aaayushsingh
Copy link


socket.on('private message',function(msg){
            console.log('message  :'+msg.split("#*@")[0]);
            models.messages.create({
                "message":msg.split("#*@")[1],
                "sender" :msg.split("#*@")[2],
                "reciever":msg.split("#*@")[0],
                "date" : new Date()});
            io.to(users[msg.split("#*@")[0]]).emit('private message', msg);
        });

The above msg is coming from frontend and thus anyone can impersonate anyone by changing the string they are sending from the frontend

@Chr728
Copy link

Chr728 commented Jun 6, 2022

@aaayushsingh is this issue solved ? or its possible I look at it ?

@aaayushsingh
Copy link
Author

This is a very poor implementation of using sockets for messaging. I ended up making my own wrapper using ioredis and passportjs for auth.

@Chr728
Copy link

Chr728 commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants