GithubHelp home page GithubHelp logo

swis's People

Contributors

ef2f-madrid avatar murillo128 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

swis's Issues

What is Swis?

Sergio, is this what you are developing for co-browsing or is it something else?

Reflector script execution prevention

While the observer now removes all the scripts from the original page, this doesn't prevent a malware user to inject scripts on the reflector. We need to find a way to avoid that.

Most probable solution is to disable unknown locations in the CSP

cc/ @ibc

Wrong dependencies

This makes no sense:

  "dependencies": {
    "bluebird": "~2.9.34",
    "body-parser": "~1.13.3",
    "cookie-parser": "~1.3.5",
    "cors": "~2.7.1",
    "debug": "~2.2.0",
    "express": "~4.13.3",
    "jade": "~1.11.0",
    "moment": "~2.10.6",
    "morgan": "~1.6.1",
    "pg": "~4.4.1",
    "ramda": "~0.17.1",
    "serve-favicon": "~2.3.0",
    "squel": "~4.1.0",
    "super-error": "~1.1.2"
  },

express as dependency of a browser library?

TypeError: Cannot read property 'removeEventListener' of undefined

Reflector.prototype.stop = function()
{
    //Clear timer (jic)
    clearTimeout (self.timer);
    //Free recording
    this.recorder  && this.recorder.close();
    //Stop painting
    this.paint(false);
    //Stop canvas
    this.canvas.close();
    //Stop higlhlighter
    this.highlighter.close();
    //Clean reverses
    this.reverse = {};
    this.map = new WeakMap();
    //Media rules
    this.mediarules = {};
    //Remove listener
    this.mirror.removeEventListener("mousemove",this.onmousemove,true);
    this.mirror.removeEventListener("selectionchange",this.onselectionchange,true);
    this.mirror.removeEventListener("submit",this.onsubmit,true);
    this.mirror.defaultView.removeEventListener("rsize",this.onresize,true);

};

The last line fails because this.mirror.defaultView is undefined.

Problem with scroll

When agent scrolls the webpage, user doesn't receive the scroll on his page (the other way works ok: when user scrolls the agent webpage is scrolled too)

XSS via onclick attributes

Mirrored elements can have onclick, etc attributes that can execute JavaScript. Since the mirror runs in an iframe this may be "inoffensive", but I'm not 100% sure about that.

<body onmouseover="alert('MOUSE OVER')">lalalal</body>

For example that "works".

paint div does not take 100% of the page height

What the agent (reflector) paints:

captura de pantalla 2016-08-24 a las 21 56 05

What the client (observers) gets:

captura de pantalla 2016-08-24 a las 21 56 55

The div the observer creates for placing the "paint" does not fit the height of the page, but just the height of the window.

window.onselectionchange is created

When running swis Reflector a global window.onselectionchange is wrongly created.

Related code:

ibc @ibc-macbook in ~/eFace2Face/src/clientCore/node_modules/swis git:master* $ ack onselectionchange
lib/observer.js
714:    document.addEventListener("selectionchange", (this.onselectionchange = function(e) {
989:    document.removeEventListener("selectionchange", this.onselectionchange, true);

lib/reflector.js
428:        mirror.addEventListener("selectionchange", (this.onselectionchange = function(e) {
954:    this.mirror.removeEventListener("selectionchange",this.onselectionchange,true);

www/swis.js
4526:   document.addEventListener("selectionchange", (this.onselectionchange = function(e) {
4801:   document.removeEventListener("selectionchange", this.onselectionchange, true);
5241:       mirror.addEventListener("selectionchange", (this.onselectionchange = function(e) {
5767:   this.mirror.removeEventListener("selectionchange",this.onselectionchange,true);

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.