diff --git a/wowstash/blueprints/__init__.py b/wowstash/blueprints/__init__.py index b99d6a4..9964638 100644 --- a/wowstash/blueprints/__init__.py +++ b/wowstash/blueprints/__init__.py @@ -1,3 +1,3 @@ from .wallet import wallet_bp -from .authentication import authentication_bp +from .auth import auth_bp from .meta import meta_bp diff --git a/wowstash/blueprints/auth/__init__.py b/wowstash/blueprints/auth/__init__.py new file mode 100644 index 0000000..40684ce --- /dev/null +++ b/wowstash/blueprints/auth/__init__.py @@ -0,0 +1,5 @@ +from flask import Blueprint + +auth_bp = Blueprint("auth", __name__) + +from . import routes diff --git a/wowstash/blueprints/authentication/routes.py b/wowstash/blueprints/auth/routes.py similarity index 78% rename from wowstash/blueprints/authentication/routes.py rename to wowstash/blueprints/auth/routes.py index b51e5d3..58357cb 100644 --- a/wowstash/blueprints/authentication/routes.py +++ b/wowstash/blueprints/auth/routes.py @@ -1,13 +1,13 @@ from flask import request, render_template, session, redirect, url_for, flash from flask_login import login_user, logout_user, current_user -from wowstash.blueprints.authentication import authentication_bp +from wowstash.blueprints.auth import auth_bp from wowstash.forms import Register, Login from wowstash.models import User from wowstash.library.jsonrpc import wallet from wowstash.factory import db, bcrypt -@authentication_bp.route("/register", methods=["GET", "POST"]) +@auth_bp.route("/register", methods=["GET", "POST"]) def register(): form = Register() if current_user.is_authenticated: @@ -18,13 +18,13 @@ def register(): # Check if Wownero wallet is available if wallet.connected is False: flash('Wallet RPC interface is unavailable at this time. Try again later.') - return redirect(url_for('authentication.register')) + return redirect(url_for('auth.register')) # Check if email already exists user = User.query.filter_by(email=form.email.data).first() if user: flash('This email is already registered.') - return redirect(url_for('authentication.login')) + return redirect(url_for('auth.login')) # Create new subaddress subaddress = wallet.new_address(label=form.email.data) @@ -42,21 +42,21 @@ def register(): login_user(user) return redirect(url_for('wallet.dashboard')) - return render_template("authentication/register.html", form=form) + return render_template("auth/register.html", form=form) -@authentication_bp.route("/login", methods=["GET", "POST"]) +@auth_bp.route("/login", methods=["GET", "POST"]) def login(): form = Login() if current_user.is_authenticated: flash('Already registered and authenticated.') return redirect(url_for('wallet.dashboard')) - + if form.validate_on_submit(): # Check if user doesn't exist user = User.query.filter_by(email=form.email.data).first() if not user: flash('Invalid username or password.') - return redirect(url_for('authentication.login')) + return redirect(url_for('auth.login')) # Check if password is correct password_matches = bcrypt.check_password_hash( @@ -65,15 +65,15 @@ def login(): ) if not password_matches: flash('Invalid username or password.') - return redirect(url_for('authentication.login')) + return redirect(url_for('auth.login')) # Login user and redirect to wallet page login_user(user) return redirect(url_for('wallet.dashboard')) - return render_template("authentication/login.html", form=form) + return render_template("auth/login.html", form=form) -@authentication_bp.route("/logout") +@auth_bp.route("/logout") def logout(): logout_user() return redirect(url_for('meta.index')) diff --git a/wowstash/blueprints/authentication/__init__.py b/wowstash/blueprints/authentication/__init__.py deleted file mode 100644 index b0e59e6..0000000 --- a/wowstash/blueprints/authentication/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from flask import Blueprint - -authentication_bp = Blueprint("authentication", __name__) - -from . import routes diff --git a/wowstash/blueprints/meta/routes.py b/wowstash/blueprints/meta/routes.py index db3dbdf..349c122 100644 --- a/wowstash/blueprints/meta/routes.py +++ b/wowstash/blueprints/meta/routes.py @@ -7,7 +7,20 @@ from wowstash.library.db import Database @meta_bp.route('/') def index(): - return render_template('index.html', node=daemon.info(), info=info.get_info()) + return render_template('meta/index.html', node=daemon.info(), info=info.get_info()) + +@meta_bp.route('/faq') +def faq(): + return render_template('meta/faq.html') + +@meta_bp.route('/terms') +def terms(): + return render_template('meta/terms.html') + +@meta_bp.route('/privacy') +def privacy(): + return render_template('meta/privacy.html') + @meta_bp.route('/health') def health(): @@ -15,7 +28,7 @@ def health(): 'cache': info.redis.ping(), 'db': Database().connected }), 200) - + # @app.errorhandler(404) # def not_found(error): # return make_response(jsonify({ diff --git a/wowstash/blueprints/wallet/routes.py b/wowstash/blueprints/wallet/routes.py index 793eaa4..c2593e2 100644 --- a/wowstash/blueprints/wallet/routes.py +++ b/wowstash/blueprints/wallet/routes.py @@ -14,7 +14,7 @@ def dashboard(): daemon_height = daemon.height()['height'] subaddress = wallet.get_address(0, user.subaddress_index)['addresses'][0]['address'] return render_template( - "account/dashboard.html", + "wallet/dashboard.html", wallet_height=wallet_height, daemon=daemon_height, subaddress=subaddress diff --git a/wowstash/factory.py b/wowstash/factory.py index b9598f4..f4ea17f 100644 --- a/wowstash/factory.py +++ b/wowstash/factory.py @@ -54,7 +54,7 @@ def create_app(): login_manager = LoginManager() login_manager.init_app(app) - login_manager.login_view = 'authentication.login' + login_manager.login_view = 'auth.login' @login_manager.user_loader def load_user(user_id): @@ -62,11 +62,11 @@ def create_app(): return User.query.get(user_id) # Routes - from wowstash.blueprints.authentication import authentication_bp + from wowstash.blueprints.auth import auth_bp from wowstash.blueprints.wallet import wallet_bp from wowstash.blueprints.meta import meta_bp app.register_blueprint(meta_bp) - app.register_blueprint(authentication_bp) + app.register_blueprint(auth_bp) app.register_blueprint(wallet_bp) app.app_context().push() diff --git a/wowstash/static/css/new-age.css b/wowstash/static/css/new-age.css index 132e951..be854eb 100644 --- a/wowstash/static/css/new-age.css +++ b/wowstash/static/css/new-age.css @@ -492,3 +492,12 @@ footer ul li a:hover, footer ul li a:focus, footer ul li a:active, footer ul li .list-inline-item i { color: rgb(76, 76, 76); } + +#register .form-control { + width: 60%; + margin: 0 auto; +} + +header.masthead .header-content-lg { + max-width: 70%; +} diff --git a/wowstash/templates/authentication/login.html b/wowstash/templates/auth/login.html similarity index 84% rename from wowstash/templates/authentication/login.html rename to wowstash/templates/auth/login.html index a4d5fcb..6be7d5c 100644 --- a/wowstash/templates/authentication/login.html +++ b/wowstash/templates/auth/login.html @@ -12,7 +12,7 @@
-
+ {{ form.csrf_token }} {% for f in form %} {% if f.name != 'csrf_token' %} @@ -30,7 +30,7 @@

-

Click here if you need to register.

+

Click here if you need to register.

diff --git a/wowstash/templates/auth/register.html b/wowstash/templates/auth/register.html new file mode 100644 index 0000000..0d738f7 --- /dev/null +++ b/wowstash/templates/auth/register.html @@ -0,0 +1,107 @@ + + + + {% include 'head.html' %} + + + + {% include 'navbar.html' %} + +
+
+
+
+
+

Be Advised

+

Wownero is a privacy centric cryptocurrency and is most safely managed on your own personal devices, on your own network, and with your own copy of the blockchain. This is a publicly accessible website, and while strict security measures are implemented on our servers, your account's security cannot be guaranteed.

+

If you decide to use this site for managing your funds, you do so at your own risk and are bound by the terms and conditions of this site. Practice good operational security and do not use this site for large amounts of funds.

+
+ FAQ - + Terms - + Privacy +

+ Proceed +
+
+
+
+
+ +
+
+
+
+ {{ form.csrf_token }} + {% for f in form %} + {% if f.name != 'csrf_token' %} + {% if f.type == 'BooleanField' %} +
+ {{ f.label }} + {{ f }} +
+ {% else %} +
+ {{ f.label }} + {{ f }} +
+ {% endif %} + {% endif %} + {% endfor %} +
    + {% for field, errors in form.errors.items() %} +
  • {{ form[field].label }}: {{ ', '.join(errors) }}
  • + {% endfor %} +
+ +
+
+
+
+ + + + {% include 'footer.html' %} + + {% include 'scripts.html' %} + + + + diff --git a/wowstash/templates/authentication/register.html b/wowstash/templates/authentication/register.html deleted file mode 100644 index 8b17a89..0000000 --- a/wowstash/templates/authentication/register.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - {% include 'head.html' %} - - - - {% include 'navbar.html' %} - -
-
-
-
-
-
- {{ form.csrf_token }} - {% for f in form %} - {% if f.name != 'csrf_token' %} - {% if f.type == 'BooleanField' %} -
- {{ f.label }} - {{ f }} -
- {% else %} -
- {{ f.label }} - {{ f }} -
- {% endif %} - {% endif %} - {% endfor %} -
    - {% for field, errors in form.errors.items() %} -
  • {{ form[field].label }}: {{ ', '.join(errors) }}
  • - {% endfor %} -
- -
-
-
-
-
-
- - {% include 'footer.html' %} - - {% include 'scripts.html' %} - - - - diff --git a/wowstash/templates/meta/faq.html b/wowstash/templates/meta/faq.html new file mode 100644 index 0000000..54ff419 --- /dev/null +++ b/wowstash/templates/meta/faq.html @@ -0,0 +1,49 @@ + + + + {% include 'head.html' %} + + + + {% include 'navbar.html' %} + +
+
+
+
+
+

Frequently Asked Questions

+

What Is This Site?

+

+ This is a website that allows you to send and receive Wownero, a meme cryptocurrency which started as a joke and fork of Monero. +

+

How Does It Work?

+

+ The site operator creates a new Wownero wallet and interfaces this website to it in the background. When new users sign up, a new subaddress gets generated and assigned to the user. Users can then use the site to send and receive transactions. +

+

Is It Safe?

+

+ No. Web wallets in general are not recommended for use as there are too many attack vectors and possible ways to potentially bypass security. Additionally, this is a custodial wallet, which means the site operator holds the mnemonic seed and technically owns all the funds within. However, if you're willing to accept the risks, web wallets do make it very easy and convenient to get started, but you have to trust that A. we won't get hacked and B. we won't scam you. +

+

Why Should I Trust You?

+

+ You shouldn't. I am a stranger on the internet operating a custodial web wallet for a privacy-oriented, joke, memecoin. This should be all the red flags you need. +

+

What Should I Use Instead?

+

+ Check the "Wallets" sections on the main Wownero website for the most recent software wallets available. Anything you can install on your own computer is the safest bet. +

+
+
+
+
+
+ + {% include 'footer.html' %} + + {% include 'scripts.html' %} + + + + diff --git a/wowstash/templates/index.html b/wowstash/templates/meta/index.html similarity index 89% rename from wowstash/templates/index.html rename to wowstash/templates/meta/index.html index da7f196..8c227bd 100644 --- a/wowstash/templates/index.html +++ b/wowstash/templates/meta/index.html @@ -16,8 +16,8 @@ {% if current_user.is_authenticated %} Wallet Dashboard {% else %} - Register - Login + Register + Login {% endif %}
@@ -42,7 +42,9 @@

About

-

This is an open source, web based, custodial wallet for the Wownero cryptocurrency. It's development and hosting service was funded by the community using the Wownero Funding System.

+

This is an open source, web based, custodial wallet for the Wownero cryptocurrency. It's development and hosting service was funded by the community using the Wownero Funding System.


For more information about this system please read the FAQ. For contact information, please see the contact section.


diff --git a/wowstash/templates/maintenance.html b/wowstash/templates/meta/maintenance.html similarity index 100% rename from wowstash/templates/maintenance.html rename to wowstash/templates/meta/maintenance.html diff --git a/wowstash/templates/meta/privacy.html b/wowstash/templates/meta/privacy.html new file mode 100644 index 0000000..c096998 --- /dev/null +++ b/wowstash/templates/meta/privacy.html @@ -0,0 +1,35 @@ + + + + {% include 'head.html' %} + + + + {% include 'navbar.html' %} + +
+
+
+
+
+

Privacy Policy

+

Here is the information we collect:

+
    +
  • Web server access logs (Source IP address, browser user-agent, page requests, etc)
  • +
  • Email address and salted/hashed password (registration)
  • +
+

We don't actively track or monitor any of this though. We don't even know what the privacy policy is supposed to be for, to be honest. Just trying to be legit.

+

None of this data is shared with any third parties; we're not lame.

+
+
+
+
+
+ + {% include 'footer.html' %} + + {% include 'scripts.html' %} + + + + diff --git a/wowstash/templates/meta/terms.html b/wowstash/templates/meta/terms.html new file mode 100644 index 0000000..4b75d3a --- /dev/null +++ b/wowstash/templates/meta/terms.html @@ -0,0 +1,34 @@ + + + + {% include 'head.html' %} + + + + {% include 'navbar.html' %} + +
+
+
+
+
+

Terms of Service

+

By using this service you accept and agree to be bound by the terms of service outlined below.

+

1. You agree to not be an asshole.

+

2. You accept the risks in using this service to manage cryptocurrency funds.

+

3. You take responsibility for anything that occurs with your user account or wallet funds.

+

4. You accept that under no circumstances will this service be liable for any lost cryptocurrency due to any reason.

+

5. You agree to participate in the meme economy and support other Wownero projects.

+
+
+
+
+
+ + {% include 'footer.html' %} + + {% include 'scripts.html' %} + + + + diff --git a/wowstash/templates/navbar.html b/wowstash/templates/navbar.html index 79a7219..72eb101 100644 --- a/wowstash/templates/navbar.html +++ b/wowstash/templates/navbar.html @@ -20,9 +20,9 @@ {% endif %} {% if current_user.is_authenticated %} - + {% else %} - + {% endif %}
diff --git a/wowstash/templates/new_account.html b/wowstash/templates/new_account.html deleted file mode 100644 index 22a5421..0000000 --- a/wowstash/templates/new_account.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - {% include 'head.html' %} - - - - {% include 'navbar.html' %} - -
-
-
-
-
-

Be Advised

-

Monero is a privacy centric cryptocurrency and is most safely managed on your own personal devices, on your own network, and with your own copy of the blockchain. This is a publicly accessible website, and while strict security measures are implemented on our servers, your account's security cannot be guaranteed.

-

If you decide to use this site for managing your funds, you do so at your own risk and are bound by the terms and conditions of this site. Practice good operational security and do not use this site for large amounts of funds.

-

The 25 word string below is your mnemonic seed. This is the password to your Monero account, and has full control over your account and funds. It can be used to restore your account on any device in the future. Never share it with anyone and store it in a secure location.

- Get Password -
-
-
-
-
- -
-
-
-

Your Account Password

-

This is your mnemonic seed and account password.

-

Store it securely and never share it with anyone. Use this to log into {{ config.SITE_NAME }}.

-

If you'd like a new seed, refresh the page.

-

-

{{ seed }}

-

- Login -
-
-
- - {% include 'footer.html' %} - - {% include 'scripts.html' %} - - - - diff --git a/wowstash/templates/timeout.html b/wowstash/templates/timeout.html deleted file mode 100644 index ef2b737..0000000 --- a/wowstash/templates/timeout.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - {% include 'head.html' %} - - - - {% include 'navbar.html' %} - -
-
-
-
-
-

Sorry

-

This site enforces strict session expirations for security reasons. You will need to log back in to continue.

- Go Home - Login -
-
-
-
-
- - {% include 'footer.html' %} - - {% include 'scripts.html' %} - - - - diff --git a/wowstash/templates/account/dashboard.html b/wowstash/templates/wallet/dashboard.html similarity index 100% rename from wowstash/templates/account/dashboard.html rename to wowstash/templates/wallet/dashboard.html