Giter Club home page Giter Club logo

oncilla's Introduction

oncilla's People

Contributors

abelino avatar amclain avatar breckenedge avatar david-kershaw-cs avatar davidmkershaw avatar denis-sokolov avatar dependabot[bot] avatar nateq314 avatar

Stargazers

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

Watchers

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

oncilla's Issues

Clean up Websockets Logic

Realize this probably isn't directly related to this PR but it's kind of weird here how authDetails is a Promise and details is the actual details. This could be cleaned up by

  1. defining authDetails like this:
let authDetails: AuthDetails | undefined = undefined;
  1. writing handlers.auth as async:
auth: async msg => {
  const { token } = msg;
  if (!auth) throw new Error("Unexpected auth message");
  authDetails = await auth
    .parseToken(token, {
      close: () => socket.terminate()
    })
    .catch(() => undefined);
  processCache();
},
  1. For handlers.push(), remove the async and change the if block:
  if (auth) {
    if (!authDetails) {
      addToQueue(msg);
      return;
    }
    if (!auth.canWrite({ auth: authDetails, kind, id })) return;
  }
  1. also do the same with the function that's passed as the last parameter to getAndObserve() in handlers.subscribe():
v => {
  if (auth) {
    if (!authDetails) {

Originally posted by @nateq314 in #40

Revise Footer and License

  • Please add a LICENSE.md file which includes the same content currently linked on Facebook's React repo
  • Please update the GitHub repository to reflect the MIT license in metadata which should result in MIT being reflected in the license portion of the GitHub UI
  • Please add the following to the footer of the README.md (please find a Theorem logo we can host and replace the Citrusbyte one I've linked):
## About Theorem

![Theorem](http://i.imgur.com/W6eISI3.png)

This software is lovingly maintained and funded by Theorem.
From whiteboarding new concepts to long-term support, Theorem works with startups and large multi-national enterprises to develop new applications, software, services, and platforms to achieve the best results and deliver Full Stack Innovation™

At Theorem we believe in and support open-source software.

* Check out more of our open-source software at Theorem.
* Learn more about [our work](https://theorem.co/portfolio).
* [Hire us](https://theorem.co/contact) to work on your project.
* [Want to join the team?](https://theorem.co/careers)

*Theorem and the Theorem logo are trademarks or registered trademarks of Theorem, LLC.*

Server-side WebSocket code is vulnerable to a targeted DoS attack

See: #40

My architectural recommendation would be to move the queue to the client side. This eliminates the attack vector where a malicious user could open a connection and send messages to fill up the queue, thus running the server out of memory. I do see that we've limited the max number of messages to 100, but an attacker could figure out that number based on when the termination happens, so it doesn't necessarily mitigate an attack (the attacker simply opens multiple connections to fill up the server's memory). Conversely, that server-side queue limit could cause UX issues for a legitimate user who is experiencing latency issues during the auth process. If the queue were moved client-side it would not only help with auth, but also if the connection goes offline for any other reason. (Related to stagger-offline-ui-changes)

A duplicate result of a change is sometimes shown

Sometimes a change is displayed applied twice briefly. It seems as if an optimistic update is briefly applied on top of a revision that already includes it. In less than a second the UI settles on the correct value again.

Screenshots and more details pending.

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.