alainmeier / cryptonote Goto Github PK
View Code? Open in Web Editor NEW:lock: A simple open source web application that lets users encrypt and share messages that can only be read once.
Home Page: https://cryptonote.me
License: MIT License
:lock: A simple open source web application that lets users encrypt and share messages that can only be read once.
Home Page: https://cryptonote.me
License: MIT License
Add the ability to set an expiration time if a message is not read. It should default to 30 days as that is a more secure default than allowing a message to sit on the server forever, encrypted or not.
Right now the testing is non-existent, so fleshing that out would be nice despite the simplicity of the app.
You can currently see if a note existed at one point because you get a 500 instead of a 404.
Allow someone to enable a passphrase on top of the encryption that is required in order to open and thus delete the message.
Using the Dockerfile below, the SQLite migration seems to fail:
FROM ruby:2.5.3
ENV RAILS_ENV production
RUN apt-get install git
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
WORKDIR /app
RUN git clone https://github.com/alainmeier/cryptonote.git .
RUN cp config/database.yml.sample config/database.yml
RUN echo "gem 'sqlite3', '~> 1.3.6'" >> Gemfile
RUN ./bin/bundle install
RUN ./bin/rake assets:precompile
RUN ./bin/rake db:setup
RUN ./bin/rake db:migrate
CMD ./bin/rails server
It gives the following error:
Step 12/14 : RUN ./bin/rake db:setup
---> Running in 406c851864e1
rake aborted!
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "(": syntax error: CREATE TABLE "messages" ("id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY, "content" text, "location" varchar, "password" varchar, "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "encryption_key" varchar, "salt" varchar, "deleted" boolean DEFAULT 'f')
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `prepare'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `block in execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:846:in `block in method_missing'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `block in say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:835:in `method_missing'
/app/db/schema.rb:19:in `block in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `instance_eval'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `define'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:44:in `define'
/app/db/schema.rb:13:in `<top (required)>'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `block in load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:226:in `load_schema'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:255:in `block in load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:295:in `block in each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:254:in `load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:248:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:252:in `block (3 levels) in <top (required)>'
SQLite3::SQLException: near "(": syntax error
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `prepare'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `block in execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:846:in `block in method_missing'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `block in say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:835:in `method_missing'
/app/db/schema.rb:19:in `block in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `instance_eval'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `define'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:44:in `define'
/app/db/schema.rb:13:in `<top (required)>'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `block in load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:226:in `load_schema'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:255:in `block in load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:295:in `block in each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:254:in `load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:248:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:252:in `block (3 levels) in <top (required)>'
Tasks: TOP => db:schema:load
(See full trace by running task with --trace)
Created database 'db/production.sqlite3'
-- enable_extension("plpgsql")
-> 0.0002s
-- enable_extension("uuid-ossp")
-> 0.0000s
-- create_table("messages", {:id=>:uuid, :default=>#<Proc:0x00005622e65b0d38@/app/db/schema.rb:19 (lambda)>, :force=>:cascade})
The command '/bin/sh -c ./bin/rake db:setup' returned a non-zero code: 1
Add a Heroku Button to the README so that people can deploy their own CryptoNotes in a flash.
Allow one to set multiple views on a note before it gets destroyed
Chrome's clipboard api spec should make this easy. jsfiddle: http://jsfiddle.net/gd29az4x/2/
Allow people to set a geofence (lat, long, km radius) in which the message can be opened
Instructions say run
rake db:setup
But it errors out for my local fork when I try to setup up the database. Looks like the repo is missing a database.yml file?
Error:
johnbackus$ rake db:setup
rake aborted!
Could not load database configuration. No such file - /Users/johnbackus/Dropbox/coding/cryptonote/config/database.yml
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application/configuration.rb:110:in `database_configuration'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.rc2/lib/active_record/railtie.rb:43:in `block in <class:Railtie>'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `instance_exec'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `block in run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `each'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `block in run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:446:in `load_tasks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/johnbackus/Dropbox/coding/cryptonote/Rakefile:6:in `<top (required)>'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)
Add a simple REST API so that the link can be generated programmatically.
The caller would provide a text and the API would return a link.
<link href='http://fonts.googleapis.com/css?family=Cabin' rel='stylesheet' type='text/css'>
should be <link href='https://fonts.googleapis.com/css?family=Cabin' rel='stylesheet' type='text/css'>
Hi,
is it possible to use this tool somewhere else than at Heroku ?
Any way to install this simply on an server ?
thanks for your replies
Though there is a lot of entropy in both the ID of the message and in the generated password, it would not hurt to add some request throttling to prevent some brute force attacks. Something like Rack Attack would be perfect.
I haven't quite figured out the pattern just yet, but this will not format as code:
development: &defaults
test:
<<: *defaults
production:
<<: *defaults
I sometimes share code on Cryptonote, so it would be nice to have a code mode that enables syntax highlighting for the recipient.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.