Giter Club home page Giter Club logo

ncrypt's People

Contributors

luggs-co avatar stbuehler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

ncrypt's Issues

codemirror modes should be sorted

The output from find "CodeMirror/mode" -mindepth 1 -type d should be piped through sort to produce somewhat reproducable results.

Partial text display

If "fullscreen" and "wrap-lines" are enabled when loading a paste (remembered in cookies), only the first 11 lines will be displayed; after a click on the bottom part the remaining text gets displayed.

codemirror misses addon/mode/overlay

Some modes (e.g. "gfm") require addon/mode/overlay, which is not included.

This leads to a runtime exception during load, breaking the complete site...

nginx with alias example

nginx doesn't allow combining rewrite and alias, so this is a little bit difficult. This is the best I came up with so far:

~~~~ nginx with alias ~~~~

# nginx doesn't allow combining rewrite and alias
# also set $__config['site']['url'] accordingly

location /paste/ {
	alias /srv/ncrypt/;
	index not-existing-file;

	fastcgi_split_path_info ^(/paste)(/.+)$;
	include fastcgi.conf; # default fastcgi params
	# overwrite some params
	fastcgi_param SCRIPT_FILENAME $document_root/index.php;
	fastcgi_param PATH_INFO $fastcgi_path_info;

	if (!-f $request_filename) {
		fastcgi_pass php-backend;
	}

	# there is no need to access any php file directly
	location ~ \.php$ {
		deny all;
	}
}

XSS vulnerability in NCrypt

For transparency reason (and with the authorization of the NCrypt maintainer), the email I sent to NCrypt the 02/03/2017 is reproduced below:


I just found an XSS vulnerability in NCrypt.

How to reproduce

  • A malicious user create a paste with the content: <script>alert('XSS')</script>
  • (S)he sends the link to the targeted user
  • The targeted user clones the paste
  • The JS payload is executed

As far as I tested it, the choice of programming language don't change the result.

Note: the payload can be "hidden" in a lot of text or code in order to "trick" users.

As far as I know, the impact is quite limited because you don't store the previous posted links in the browser, but it can be used to de-anonymize users for example.

I found this vulnerability because I'm currently and voluntarily searching for XSS vulnerabilities in a lot of FLOSS.

I remain available for any additional comments or questions.

Best,
Martin

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.