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

security issue, udp listen 0.0.0.0 host #153

Open
ArtemIsmagilov opened this issue Oct 13, 2024 · 1 comment
Open

security issue, udp listen 0.0.0.0 host #153

ArtemIsmagilov opened this issue Oct 13, 2024 · 1 comment

Comments

@ArtemIsmagilov
Copy link

I suggest establishing a connection udp.bind and udp.connect from user arguments and not independently. It will be more flexible and safe. Now you listen to everything

let socket = UdpSocket::bind("0.0.0.0:0")?;

@ArtemIsmagilov
Copy link
Author

It would be nice to do something like...

impl UdpStream {
    pub fn new(bind_addr: &Url, connect_addr: &Url) -> Result<Self, MemcacheError> {
        let socket = UdpSocket::bind(&*bind_addr.socket_addrs(|| None)?)?;
        socket.connect(&*connect_addr.socket_addrs(|| None)?)?;

I will try to implement this, while things are difficult.

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

1 participant