GithubHelp home page GithubHelp logo

n0rdy / remindme Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 1.0 3.58 MB

A simple terminal reminder app

License: GNU General Public License v3.0

Go 100.00%
cli-app go golang reminder reminder-app terminal-app terminal-reminder-app

remindme's People

Contributors

dependabot[bot] avatar n0rdy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

0xack13

remindme's Issues

Security flaw: server is listening on all IP addresses — even globally accessible

The following pertains to remindme version 1.0.6 (commit 332e03d):

$ remindme start
$ sudo netstat -anp | grep remindme
tcp6       0      0 :::15555                :::*                    LISTEN      3375763/remindme    

In effect, remindme is listening to even globally accessible IP addresses (I confirmed this by telnet'ing to my home pc from a remote VPS), which is a security nightmare: not only would everybody be able to post reminders for me, they would also be able to exploit potential security vulnerabilities.

As a minimum, remindme should — by default — restrict itself to listening to localhost (either ::1 or 127.0.0.1).

Better yet: Use a socket for client-server communication [on platforms that support it], make the socket owned by the user who starts remindme, and make the socket R/W'able by the owner only. The name and location for the socket should be user configurable, and default to e.g. /run/user/$UID/remindme.socket (on a Linux box).

Please make bind address and port user configurable

Currently (v1.0.10 @ commit 8b70c23) remindme is listening on port 15555. As mentioned in #1, this port may already be in use on the local machine, in which case remindme will be unable to run.

Therefore it will make sense to make the listening port configurable.

In spite of what has been written about safe IP addresses in #1, it may also be useful to make the listening address configurable.

E.g., you could have more than once instance of remindme running locally by using 127.0.0.1, 127.0.0.2, …, or you could choose to let it bind to an address on a VPN so that several machines can share a single instance of remindme, or you could use it to overrride the default socket path (once that has been implemented).

The bind address and port could be specified via options for the remindme start command, or simply by using environment variables, e.g.:

  • $REMINDME_BIND_ADDR
  • $REMINDME_BIND_PORT

(_BIND can be omitted)

Ideally, $REMINDME_BIND_ADDR should default to a socket or to localhost, and $REMINDME_BIND_PORT could very well default to 15555 if the bind address is an IP address.

As also mentioned in #1, a safe choice for the socket name is $XDG_RUNTIME_DIR/remindme-$UID.socket, but the user may have a different opinion and specify the absolute path to the desired socket, in which case the $REMINDME_BIND_ADDR starts with a / (at least on linux/unix).

A configuration file can also be used, of course.


Redundant information: XDG Base Directory Specification:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.