Giter VIP home page Giter VIP logo

pglombardo / passwordpusher Goto Github PK

View Code? Open in Web Editor NEW
1.7K 23.0 324.0 42.69 MB

๐Ÿ” An application to securely communicate passwords over the web. Passwords automatically expire after a certain number of views and/or time has passed. Track who, what and when.

Home Page: https://pwpush.com

License: Apache License 2.0

Ruby 57.00% Procfile 0.02% JavaScript 3.97% HTML 37.89% CSS 0.04% Shell 0.19% Dockerfile 0.56% Smarty 0.33%
security password-expiration password password-safety communicate-passwords password-pusher heroku ruby kubernetes openshift-templates

passwordpusher's Introduction

Password Pusher Front Page

Simple & Secure Password Sharing with Auto-Expiration of Shared Items

GitHub Workflow Status (with event) Dependencies Status Semantic Versions License


Give your users the tools to be secure by default.

Password Pusher is an open source application to communicate passwords over the web. Links to passwords expire after a certain number of views and/or time has passed.

Hosted at pwpush.com but you can also easily run your own private instance with just a few steps.

  • Easy-to-install: Host your own via Docker, a cloud service or just use pwpush.com
  • Open Source: No blackbox code. Only trusted, tested and reviewed open source code.
  • Versatile: Push passwords, text, files or URLs that auto-expire and self delete.
  • Audit logging: Track and control what you've shared and see who has viewed it.
  • Encrypted storage: All sensitive data is stored encrypted and deleted entirely once expired.
  • Host your own: Database backed or ephemeral, easily run your own instance isolated from the world.
  • JSON API: Raw JSON API available for 3rd party tools or command line via curl or wget.
  • Command line interface: Automate your password distribution with CLI tools or custom scripts.
  • Logins: Invite your colleagues and track what is pushed and who retrieved it.
  • Admin Dashboard: Manage your self-hosted instance with a built in admin dashboard.
  • Internationalized: 29 language translations are bundled in. Easily selectable via UI or URL
  • Themes: 26 themes bundled in courtesy of Bootswatch. Select with a simple environment variable.
  • Unbranded delivery page: No logos, superfluous text or unrelated links to confuse end users.
  • Customizable: Change text and default options via environment variables.
  • Light & dark themes: Via CSS @media integration, the default site theme follows your local preferences.
  • Re-Brandable: Customize the site name, tagline and logo to fit your environment.
  • Custom CSS: Bundle in your own custom CSS to add your own design.
  • 10 Years Old: Password Pusher has securely delivered millions and millions of passwords in its 10 year history.
  • Actively Maintained: I happily work for the good karma of the great IT/Security community.
  • Honest Software: Open source written and maintained by me with the help of some great contributors. No organizations, corporations or evil agendas.

๐Ÿ’Œ --> Sign up for the newsletter to get updates on big releases, security issues, new features, integrations, tips and more.

Password Pusher is also on Twitter, Gettr and on Facebook


โšก๏ธ Quick Start

โ†’ Go to pwpush.com and try it out.

or

โ†’ Run your own instance with one command: docker run -d -p "5100:5100" pglombardo/pwpush:latest then go to http://localhost:5100

or

โ†’ Use one of the 3rd party tools that interface with Password Pusher.

๐Ÿ’พ Run Your Own Instance

๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

We've recently introduced a single universal container. Migration for existing users is easy - please refer to the documentation here.

๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

Note: Password Pusher can be largely configured by environment variables so after you pick your deployment method below, make sure to read the configuration page. Take particular attention in setting your own custom encryption key which isn't required but provides the best security for your instance.

On Docker

Docker images of Password Pusher are available on Docker hub.

โžœ ephemeral Temporary database that is wiped on container restart.

docker run -d -p "5100:5100" pglombardo/pwpush:latest

Learn more

โžœ using an External Postgres Database Postgres database backed instance.

docker run -d -p "5100:5100" pglombardo/pwpush:latest -e DATABASE_URL=postgres://pwpush_user:pwpush_passwd@postgres:5432/pwpush_db

Learn more

โžœ using an External MariaDB (MySQL) Database Mariadb database backed instance.

docker run -d -p "5100:5100" pglombardo/pwpush:latest -e DATABASE_URL=mysql2://pwpush_user:pwpush_passwd@mysql:3306/pwpush_db

Learn more

Note: Putting passwords in a command line is bad practice. See the related Database pages for alternative options.

See Also: Guide to DATABASE_URL

Docker Tags Reference

Tag Purpose
vX.X.X Versioned tags
stable The most stable tag for proven releases
latest The latest (most recent) released vX.X.X
nightly The nightly development build

If in doubt, use latest or the stable tag.

The previously used release tag is no longer used and won't be updated again. Instead use the stable tag.

With Docker Compose

โžœ One-liner Password Pusher with a Postgres Database

curl -s -o docker-compose.yml https://raw.githubusercontent.com/pglombardo/PasswordPusher/master/containers/docker/docker-compose-postgres.yml && docker compose up -d

โžœ One-liner Password Pusher with a MariaDB (MySQL) Database

curl -s -o docker-compose.yml https://raw.githubusercontent.com/pglombardo/PasswordPusher/master/containers/docker/docker-compose-mariadb.yml && docker compose up -d

On Kubernetes

Instructions and explanation of a Kubernetes setup can be found here.

On Kubernetes with Helm

A basic helm chart with instructions can be found here.

On Microsoft Azure

There used to be a 3rd party blog post with instructions but it's been deleted. If anyone has instructions they would like to contribute, it would be greatly appreciated.

See issue #277

On Heroku

One click deploy to Heroku Cloud without having to set up servers.

Deploy

This option will deploy a production Password Pusher instance backed by a postgres database to Heroku. Heroku used to offer free dynos but that is no longer the case from November 28, 2022. Hosting charges will be incurred.

On PikaPods

One click deploy to PikaPods from $1/month. Start free with $5 welcome credit.

Run on PikaPods

With Nginx

See the prebuilt Docker Compose example here.

From Source

I generally don't suggest building this application from source code for casual use. The is due to the complexities in the tool set across platforms. Running from source code is best when you plan to develop the application.

For quick and easy, use the Docker containers instead.

But if you're resolute & brave, continue on!

Dependencies

  • Ruby 3.0 or greater
  • Recent Node.js stable & Yarn
  • Compiler tools: gcc g++ make
  • Other: git

SQLite3 backend

  • Make sure to install sqlite3 development libraries: apt install libsqlite3-dev sqlite3
git clone [email protected]:pglombardo/PasswordPusher.git
cd PasswordPusher
gem install bundler

bundle config set --local deployment 'true'
bundle install --without development production test
./bin/rails assets:precompile
./bin/rails db:setup
./bin/rails server

Then view the site @ http://localhost:5100/.

Postgres, MySQL or Mariadb backend

  • Make sure to install related database driver development libraries: e.g. postgres-dev or libmariadb-dev
git clone [email protected]:pglombardo/PasswordPusher.git
cd PasswordPusher
gem install bundler

export RAILS_ENV=production

# Update the following line to point to your Postgres (or MySQL/Mariadb) instance
DATABASE_URL=postgresql://passwordpusher_user:passwordpusher_passwd@postgres:5432/passwordpusher_db

bundle install --without development test
./bin/rails assets:precompile
./bin/rails db:setup
./bin/rails server --environment=production

Then view the site @ http://localhost:5100/.

๐Ÿ”จ 3rd Party Tools

Command Line Utilities

GUIs

Libraries & APIs

  • oyale/PwPush-PHP: a PHP library wrapper to easily push passwords to any Password Pusher instance

Android Apps

Application Integrations

See also the Tools Page on pwpush.com.

๐Ÿ“ก The Password Pusher API

๐Ÿ‡ฎ๐Ÿ‡น Internationalization

Password Pusher is currently available in 29 languages with more languages being added often as volunteers apply.

From within the application, the language is selectable from a language menu. Out of the box and before any language menu selection is done, the default language for the application is English.

Changing the Default Language

The default language can be changed by setting an environment variable with the appropriate language code:

PWP__DEFAULT_LOCALE=es

For more details, a list of supported language codes and further explanation, see the bottom of this configuration file.

๐Ÿ›Ÿ Help Out

pwpush.com is hosted on Digital Ocean and is happily paid out of pocket by myself for more than 10 years.

But you could help out greatly by signing up to Digital Ocean with this link (and get $200 credit). In return, Password Pusher gets a helpful hosting credit.

tldr; Sign up to Digital Ocean with this link, get a $200 credit for free and help Password Pusher out.

DigitalOcean Referral Badge

๐Ÿ“ผ Credits

Translators

Thanks to our great translators!

If you would like to volunteer and assist in translating, see this page.

Name Language
Oyale Catalan
Finn Skaaning Danish
Mihail Tchetchelnitski Finnish
Thibaut French
Thomas Wรถlk German Github, Twitter
Martin Otto German
Robin Jรธrgensen Norwegian
ลukasz Polish
Jair Henrique Portuguese
Fabrรญcio Rodrigues Portuguese
Ivan Freitas Portuguese
Sara Faria Portuguese
Oyale Spanish
johan323 Swedish
Fredrik Arvas Swedish
Pedro Marques European Portuguese

Also thanks to translation.io for their great service in managing translations. It's also generously free for open source projects.

Containers

Thanks to:

Other

Thanks to:

...and many more. See the Contributors page for more details.

๐Ÿ›ก License

License

This project is licensed under the terms of the Apache License 2.0 license. See LICENSE for more details.

๐Ÿ“ƒ Citation

@misc{PasswordPusher,
  author = {Peter Giacomo Lombardo},
  title = {An application to securely communicate passwords over the web. Passwords automatically expire after a certain number of views and/or time has passed.},
  year = {2024},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/pglombardo/PasswordPusher}}
}

passwordpusher's People

Contributors

bozz95 avatar ceonelson avatar davidsawyer avatar dependabot[bot] avatar fiskhest avatar havedill avatar iamjatinchauhan avatar jacobsyndeo avatar jairhenrique avatar jantari avatar julienamoros avatar justin-rhoades avatar kaspergrubbe avatar lnfnunes avatar m3nu avatar mastqe avatar mindtooth avatar mtchetch avatar pglombardo avatar pyro2927 avatar sfarosu avatar sirux88 avatar snyk-bot avatar stenrose avatar tbroadley avatar teck-kian avatar todd-a-jacobs avatar ur5us avatar wikijm avatar zxjinn 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

passwordpusher's Issues

Change structure to open link that has a form which on submit redirects to the password

I love pwpush!

But... currently views are measured through each request that comes to the given link. However a lot of businesses have mail scanners installed which crawl each link for security reasons and possibly open it. This costs you a view.

The results of this are:

  • I cannot set the views to 1 as I don't know for sure if they have a mail scanner like that.
  • I must therefore set the views to 2 minimum and communicate that this link has 2 views, however the issue with this is. Most people don't know that they have a link crawling mail scanner so if they get to the page and think, "oh 0 views left but it should have been 1". They don't know if it was an intercepted password or the fault of an overzealous mail scanner.

Could you fix this?

P.S.
Something else, show ranges for the settings: this is view 1 of 3 for instance.

Copy to clipboard on subsequent views

Currently, only the first view of a newly-generated password displays a "copy to clipboard" link. It would be convenient (and potentially increase security) if subsequent views also had the ability to copy to the clipboard without de-obfuscating the password.

The code to do this is already in app/views/passwords/show.html.haml, but it would probably have to be hoisted into a helper or service object to keep it DRY. There may be other approaches, too, but that seems like the simplest solution.

Dockerfile build fails for passwordpusher-postgres

The command docker build . is failing when using PasswordPusher/containerization/passwordpusher-postgres/Dockerfile

This is the output of the build command. It seems the build is failing because it can't reach the postgres server or more specifically it can't resolve the dns name postgres. The computer I'm building this on does not have access to the external postgres server. Can the docker image be built without access to the postgres server?

Bundle complete! 22 Gemfile dependencies, 73 gems now installed.
Gems in the groups development, private and test were not installed.
Bundled gems are installed into `./vendor/bundle`
A, [2018-06-20T23:33:08.003600 #14889]   ANY -- : Stan is on the scene.  Starting Instana instrumentation.
sh: 1: /sbin/ip: not found
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
rake aborted!
PG::ConnectionBad: could not translate host name "postgres" to address: Temporary failure in name resolution
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_handling.rb:87:in `connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/instana-1.7.11/lib/instana/frameworks/instrumentation/active_record.rb:26:in `<top (required)>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/instana-1.7.11/lib/instana/frameworks/rails.rb:21:in `block in <class:Railtie>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:44:in `each'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `instance_exec'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `run'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:54:in `run_initializers'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:352:in `initialize!'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `public_send'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `method_missing'
/opt/PasswordPusher/config/environment.rb:42:in `<top (required)>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:328:in `require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:328:in `require_environment!'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
W, [2018-06-20T23:33:08.070310 #14889]  WARN -- : Instana: Host agent not available.  Will retry periodically.
The command '/bin/sh -c bundle install --without development private test --deployment &&     bundle exec rake assets:precompile &&     RAILS_ENV=production' returned a non-zero code: 1

Changing default slider values

I love your app.

I've changed the default slider values to 10 days and 5 views. This worked technically but cosmetically the page still shows 30 days and 10 views. I have no idea why, I've restarted the server and cleared tmp/cache. The page I edited was app/views/passwords/new.html.haml on lines 13,15 and 17,19.

If the sliders are moved the display immediately changes to the correct value.

Change subdomain

Is it possible to specify a subdomain for this to run on? I don't want it to run on my site's root, but I'm not too familiar with Ruby to be able to change this myself.

assets compilation issue

Hi there,

first of all thanks for this great app. i get an error in assets compilation in production env and css more precisely.

Here is the output of bundle exec rake assets:precompile from log/production.log

Compiled users.css  (2ms)  (pid 48421)
Compiled application.css  (40ms)  (pid 48421)
Compiled jquery.js  (3ms)  (pid 48421)
Compiled jquery_ujs.js  (0ms)  (pid 48421)
Compiled api.js  (33ms)  (pid 48421)
Compiled errors.js  (1ms)  (pid 48421)
Compiled fd-slider.js  (1ms)  (pid 48421)
Compiled jquery-cookie.js  (0ms)  (pid 48421)
Compiled jquery.noty.js  (0ms)  (pid 48421)
Compiled layouts/top.js  (0ms)  (pid 48421)
Compiled passwords.js  (0ms)  (pid 48421)
Compiled spoiler.js  (0ms)  (pid 48421)
Compiled themes/default.js  (0ms)  (pid 48421)
Compiled modernizr.js  (0ms)  (pid 48421)
Compiled application.js  (78ms)  (pid 48421)
Warning. Error encountered while saving cache /Users/xx/xx-xx/xx-xx-xx/tmp/cache/sass/efcd6618511989f0583e175ca710234f909d501b/api.css.scssc: can't dump anonymous class #<Class:0x007f829b4b4c48>

Compiled api.css  (2ms)  (pid 48421)
Warning. Error encountered while saving cache /Users/xx/xx-xx/xx-xx-xx/tmp/cache/sass/efcd6618511989f0583e175ca710234f909d501b/errors.css.scssc: can't dump anonymous class #<Class:0x007f829b4b4c48>

Compiled errors.css  (1ms)  (pid 48421)
Compiled fd-slider.css  (1ms)  (pid 48421)
Warning. Error encountered while saving cache /Users/xx/xx-xx/xx-xx-xx/tmp/cache/sass/efcd6618511989f0583e175ca710234f909d501b/global.css.scssc: can't dump anonymous class #<Class:0x007f829b4b4c48>

Compiled global.css  (9ms)  (pid 48421)
Warning. Error encountered while saving cache /Users/xx/xx-xx/xx-xx-xx/tmp/cache/sass/efcd6618511989f0583e175ca710234f909d501b/passwords.css.scssc: can't dump anonymous class #<Class:0x007f829b4b4c48>

Compiled passwords.css  (14ms)  (pid 48421)
Warning. Error encountered while saving cache /Users/xx/xx-xx/xx-xx-xx/tmp/cache/sass/efcd6618511989f0583e175ca710234f909d501b/users.css.scssc: can't dump anonymous class #<Class:0x007f829b4b4c48>

Compiled users.css  (3ms)  (pid 48421)
Compiled application.css  (51ms)  (pid 48421)

sass is 3.4.22, any ideas ?

Thanks !

Internal Server Error, (application.css isn't precompiled)

I can run this fine from the rails server. once i add my apache config to run it as a virtual host I only get a page that says:
"We're sorry, but something went wrong." etc.
I turned on debug logging and see this:
Started GET "/" for 10.1.91.44 at Wed Aug 01 18:53:51 -0400 2012
Processing by PasswordsController#new as HTML
Rendered passwords/new.html.haml within layouts/application (18.8ms)
Completed 500 Internal Server Error in 110ms

ActionView::Template::Error (application.css isn't precompiled):
2: %html
3: %head
4: %title PasswordPusher
5: = stylesheet_link_tag "application"
6: = javascript_include_tag "application"
7: = csrf_meta_tags
8: = render :partial => "layouts/ga" if Rails.env == "production"
app/views/layouts/application.html.haml:5:in _app_views_layouts_application_html_haml___316259974_70142076888800' app/controllers/passwords_controller.rb:72:innew'

Any idea? I started with setting RAILS_ENV=private but got different errors so redid with "production". I'm not sure how to easily switch back and forth, IE which commands would have to be re-run.

Insecure default settings

I think pwpush.com is a great service, but IMO the default expiration settings are way too loose. If a client sends me an e-mail with a link that doesn't expire for 30 days and 10 views, then that's a really large window for an attacker.

Ideally, I'd go for 3 days and 1 view, but that's probably too tight more the general public. Maybe 8 days and 2 views?

Instaling on CentOS

I'm receiving the following when trying to run bundle install --without development production test --deployment

The git source git://github.com/pglombardo/ezcrypto.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
The git source git://github.com/russfrisch/modernizr-rails.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
You are trying to install in deployment mode after changing
your Gemfile. Run bundle install elsewhere and add the
updated Gemfile.lock to version control.

You have added to the Gemfile:

  • pry (= 0.9.12.4)

You have deleted from the Gemfile:

  • pry
  • pry-byebug

SSL Secured.

Is it possible to secure the application itself?

I'll be using haproxy, and securing the front end.. but I want both the front end and back end secured.

After a bit of searching, it looks like a chain of proxies would be the way to go. That would ensure the traffic is encrypted all the way to the machine the application is on.

Am I overlooking anything?

Setting view count to 1 has unintuitive outcome

First of all, I love pwpush - thanks for the time that you are putting in there.

I'm using it for receiving passwords from clients occasionally, and sometimes they set the view count to 1. Unfortunately the one view seems to be used when they're being redirected to the site for copying the link. So I'm getting expired passwords quite frequently.
Any chance to fix this, so that the first view of the person copying the link isn't counted?

Thanks,
Philipp

Error 500

I have setup the app behind nginx and passenger. When I create a dummy helloworld app, I can serve up that rails app without issue. When I point to the PasswrodPusher, I am getting a 500 error. I made sure my production assets are precompiled, and so on. I'm not finding anything in my nginx logs either. Any ideas on where to look? Is there any logging within the app itself?

Thank you.

Simplest method to secure with HTTPS/SSL?

I have a passpusher server deployed in my environment and am hoping to find the best way encrypt the interactions with the server. Wiresharking the interactions as of now shows the payload in plain text.

I tried to follow the advice listed at: #44

But had the same issues as OP - 403 Forbidden.

I'm not a Ruby guy, so I'm a bit in the dark on this one.

Thank you for your time and your great project.

Foreman not installed

Is foreman required to make this work? Doing a new deployment today on a fresh CentOS 7 install and I don't have foreman installed.

Select; Copy; Paste has a space at the end in FF and IE

Reported by Zookee here:

When copying the text after clicking the pwpush link, sometimes it adds a
space at the end. I tested this in Firefox, IE, and Chrome, the trailing space
occurred in FF and IE but not Chrome.
Example, "testpassword" becomes "testpassword ".
Is this a bug or a browser issue?

Internationalization

Per this thread, arrowsama and elite_killerX have graciously offered to translate the site strings into French, Spanish and Catalan.

A better local install method

Instead of:

git clone [email protected]:pglombardo/PasswordPusher.git
cd PasswordPusher
gem install bundler
bundle install --without development production test --deployment
bundle exec rake assets:precompile
RAILS_ENV=private bundle exec rake db:setup
foreman start internalweb

Then view the site @ http://localhost:5000/.

we should provide a ruby executable to do this in one step. So the resulting instructions would be:

git clone [email protected]:pglombardo/PasswordPusher.git
cd PasswordPusher
./bin/run_private

Then view the site @ http://localhost:5000/.

That script can/should also:

  1. Validate Ruby version
  2. Existence of required base gems (e.g. bundler)
    etc...

API documentation problems, syntax error and http/https

https://github.com/pglombardo/PasswordPusher/wiki/Password-API

The curl example says curl -d -X POST --data "pas... but -d and --data are redundant and since they require a parameter then -d -X POST is interpreted as -d "-X" followed by a hostname of POST.

Also, the examples use http://; when I try to post to http://pwpush.com/p.json I always get a blank response. It appears that the real API requires HTTPS? https://pwpush.com/p.json returns expected responses.

Production Instructions

Hi there,

Got this thing up and running on Ubuntu 16.04 w/o issue. I know very little about rails apps. Now - a few quick questions:

On the page regarding production,

Does the export RAILS_ENV=production just get run on the CLI - I assume so.

Now - going above that, How would I deploy so that I could run forman at boot? I would then likely throw nginx in front of it and put a SSL cert on otherwise.

I have a low volume use case, so I was thinking of leaving the DB on sqllite. Or is it still worth moving to mariadb or something?

Just looking at filling in the gaps to moving it into production. Or have any external users done to top to bottom tutorial?

Add heroku config vars to modify configurable parts

pwpush can be configured by modifying the values in config/environment.rb. We should add environment variables for each of those settings so that in Heroku, a user could simply run (as an example) heroku config:add EXPIRE_AFTER_DAYS_DEFAULT=1 to configure the default days value.

Change the cookie expiration time

The pwpush_days and pwpush_views cookies expire at the end of the session by default.

I find it annoying to have to reset my password defaults every time my browser restarts.

Can you either extend the expiration time or provide a second link for users who want to make the settings "permanent".

500 Error After Entering a Password

Hi. Everything seems to go well in setting up the server following the directions on GitHub, but when users put in a password and click "push it", the all go to /p and get a 500 error. What should I check? I did have to add gem devise in the gemfile to get the install to go through to begin with.

Suggest not using super large font for password.

To prevent someone from reading it from across the room. Also, blur effect is not quite blurry enough to prevent reading. Perhaps have copy to clipboard option so no need to display at all.

zero knowledge?

is there a clear-text copy of the password on the server?

Idea: Alfred workflow

Hi,

I'm a happy and frequent user of the hosted version of this tool.

I have an idea, and I hope it's ok to simply write it here. It would be great to have the opportunity to create pwpush URLs with Afred. I imagine it like:

Launch alfred > type in "pwp mypassword" > A pwpush.com site for this password opens (some default settings), and it's URL is copied into the clipboard automatically

Possible at all? Just dreaming :)

Philipp

The confirmation screen should not spend one of the viewings.

From dribbling user on Reddit:

I'm confused about something. When I choose for the password to disappear after x viewings 
(let's say, 3) and submit, the app automatically goes to a confirmation screen that spends one 
of these viewings.

This seems counterintuitive. The confirmation screen should not spend one of the viewings.

Is it a problem with my browser or connection? I don't think so.

Deploying into prod - MySQL error on DB creation

Hi there,

I'm deploying to a production system, and I am running the command:

RAILS_ENV=production bundle exec rake db:setup

And when I do, I get the following error:

-- create_table("passwords", {:force=>true})
rake aborted!
ActiveRecord::StatementInvalid: Mysql::Error: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

Are there any known issues using mysql?

Configuring SSL

Hi!
I'm having some issues enabling SSL on my production server. Apologies for the noobish question but are there any additional steps besides adding the config.force_ssl = true line to production.rb? It still only responds to the 5000 port number.
Thanks!

Add support for Slack integration

I'm trying to create a /Slash command for slack to securely share passwords. Can someone point me in the right direction, please?
pw-pusher

Modifying color scheme / layout

PWPUSH is awesome! Such a life/timesaver!

I'm working on adding a different color scheme / layout to the page, however running into issues when doing so. Can you specify which css file(s) should be modified to accomplish this?

Also, I noticed when updated the css, the old pages get pulled from /tmp/cache and don't reflect the changes. Is this typical behavior or should there be a different way to refresh each time, other than removing these files?

Much appreciated, thank you!!!!
-Jon

Add authentication

Per this Twitter thread:
https://twitter.com/thanius/status/1001438709462523904

When passing password URLs to outside clients/customers, the front page form should be password protected and not accessible globally.

Depending on time available, I may just add basic HTTP auth to start but using devise like logins to also track created passwords would be ideal.

Completed 500 Internal Server Error

Hi everyone,

Could you help me... after press "push it!" the error message is displayed.

Webpage
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.

Terminal output

12:12:30 internalweb.1 | Processing by PasswordsController#create as HTML
12:12:30 internalweb.1 |   Parameters: {"utf8"=>"โœ“", "authenticity_token"=>"ZtNUdLLeD4XgnZ+pkl/ehPY5Nx8JXcQdy9IZBtLRqG4fAXxCU4RuoqgLD5vJ2Mjww2lPGAJn8oDOzeSzjWBMHw==", "password"=>"[FILTERED]", "commit"=>"Push it!"}
12:12:30 internalweb.1 |    (0.2ms)  begin transaction
12:12:30 internalweb.1 |   SQL (0.4ms)  INSERT INTO "passwords" ("expire_after_days", "expire_after_views", "deletable_by_viewer", "url_token", "first_view", "payload", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)  [["expire_after_days", 1], ["expire_after_views", 1], ["deletable_by_viewer", "t"], ["url_token", "m1cvna0odqodl7n3"], ["first_view", "t"], ["payload", "7vc2R7lKzLdqoZyu4EGgQQ==\n"], ["created_at", "2018-01-09 14:12:30.947856"], ["updated_at", "2018-01-09 14:12:30.947856"]]
12:12:30 internalweb.1 |    (0.1ms)  rollback transaction
12:12:30 internalweb.1 | Completed 500 Internal Server Error in 25ms (ActiveRecord: 2.0ms)
12:12:30 internalweb.1 | 
12:12:30 internalweb.1 | ActiveRecord::StatementInvalid (SQLite3::ReadOnlyException: attempt to write a readonly database: INSERT INTO "passwords" ("expire_after_days", "expire_after_views", "deletable_by_viewer", "url_token", "first_view", "payload", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)):
12:12:30 internalweb.1 |   app/controllers/passwords_controller.rb:89:in `block in create'
12:12:30 internalweb.1 |   app/controllers/passwords_controller.rb:88:in `create'

Ps: it was working perfectly.

Thank you

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.