From 17769e952c4a3a1b40ed0baf48d9f64affe6e4f9 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Tue, 15 May 2018 09:52:07 -0400 Subject: [PATCH] Allow old login method with suitable warning. --- brutaldon/static/images/sensitive.png | Bin 0 -> 3619 bytes brutaldon/templates/setup/login-oauth.html | 8 ++++++++ brutaldon/templates/setup/login.html | 6 ++++-- brutaldon/urls.py | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 brutaldon/static/images/sensitive.png diff --git a/brutaldon/static/images/sensitive.png b/brutaldon/static/images/sensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..8745489a85989761568b78d5741a3097ca9dc709 GIT binary patch literal 3619 zcmb_f_ct40_fM=)t5)sODy>q)Y-5j7yUI(|2r7yiwW%5%sMf62T0v{i)}BFHRLsPP z6-8~L(vTo{)9*j<{pJ1P-g};V&U5ZP_kNzwy-)moGXvHO0v7-P0IT6Wy$4hq{ZAMf zs2Zu^jG`I_7h?lGfH^=5@Sl6(_V!c{)3bZF0RR9q*FOOQvUB;UPEeqs>0Qt=Jv*z2 z{DmZ49jZ&%!|Gw6uCKQ@%qNg~1ORmXVa|atSJ4oUKzC6CL(}`NGB6M|bey4{wpHlt zZeEyG`t(Ay2p@whzcMV2!yX8;5Pf@f*~bg*t|&3?t~7~7XaD$E>~ZQ@ZTL6BO=0p; zfSRr1EwDsiM6#*?kk?8}Pnn*MeulJrLi@Luj+OEbvM3k81uXZykZpnUn{jLzWLFih8h`@P*0(VV^VKl6G*~MVt(l7ira`Or>x`J z_wjq2F0$&xjG~~RrD1Vq3&Dz`KYLOw+;FlMVS|x~H%PhB_-GjA8wY+dQFjRwJNzPM zi1?Jf5l|}|nX&XamgZu>mQa*KgGtz}Kzqh~M?7F>rV0MV_-9C7zt}YGkb|5->AtZs z>YllAX;BA_)KjUpxrdLvTuiLp4s{pFfKN6G87m3;{Q&CKgm9Ok>R9zCJ0L#2Urapu zQ(yXca@@^i#KX?~-JIYDmJXP);f?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(jySV8%YjfP0x$_;`f?e~)RNR!B;qKx$_hqlDs+MaW zD=4is*LDPc+MK>kSOMpiPv=pSSZWOOmESJrA9OLZ&<69{DBR`>syTpFR9syiV_MDm zQEvfmcF^%1g`m@-1ST6(;cw#q-wk1G#NEN+;n8Y;)zO|2b%?QO~Oj zsDt(S!vD_|n0ZP}7GPjE)`p-WpK}!CZAhPN-i;0}YCR>6DPGpvz+P1AT=3gnNJD>+ zm+5m{Mon&)Rn)jmkU8jB4*Gxo;K(q#JGjcN9Mzsj%@eY>y0OzuzTUsQxtkOeB1NUV z3k2pCKlM23G}&Ll>kgkqD}}mV)Qtt9>$5Hi&RzaJKOlYw9OGbjNSIY+u4`-_kLUQK zu-n*tp2}Gup8XzF0G@VQcY1%GqFu(y3Rbk*?!a&FA+;7?N{6pU2s7n2B&jLwGUYWW z2PXV1ZQ<~}1hdzs=h^bmFC=?FV$cG$JN8UH5L!G>J z&SlQ>sw$TyIMljk9!~!e^4WQ1qvlq)?cbk|@&b4}c=|S&3QY&+aN#E+Z~hw4&Lrk1E|M}bJ@fX+!CH+eL#U-C@}O$_Hbm9Q16HUeSxkNT8@H@ zFZO2Q@>k#W$I?4_xeV3Umo$Z%jU3opN7TjE#mJ6RiJiKNwN^_fZkCZjSGyg)QGDTY zegr!GB<3F6c+!Ut56~F&%;AEWegdmSZ->g-z}e$#;@AEXiH1b{c5G*wdRS{%ZlXrq z)Nl+CcX_zW#^AfAJLZ?|GHpYiCW4g7spY@li|{)$@hX*Ur(E07aPo1k5rU!ywya>h zz}dHb_PTqKK3Wl9(7D^KSGzyYjtzsor?_DPe1crln;Ka!6}?eqlb%x)68wue^a{0L zGt)Jg&N!tmpazv_E1=}^@}-K)2sgiUaHZ! literal 0 HcmV?d00001 diff --git a/brutaldon/templates/setup/login-oauth.html b/brutaldon/templates/setup/login-oauth.html index ba7baa0..0547216 100644 --- a/brutaldon/templates/setup/login-oauth.html +++ b/brutaldon/templates/setup/login-oauth.html @@ -22,5 +22,13 @@ +
+ +
+ Not able to log in with this form? Maybe your brutaldon instance isn't + visible on the internet to your Mastodon instance? If so, you can use + the old login form. +
+
{% endblock %} diff --git a/brutaldon/templates/setup/login.html b/brutaldon/templates/setup/login.html index 7c703e2..6d3c015 100644 --- a/brutaldon/templates/setup/login.html +++ b/brutaldon/templates/setup/login.html @@ -4,7 +4,7 @@ {% block content %}

Log in to your instance

-
+ {% csrf_token %}
@@ -46,7 +46,9 @@ This information is only used to log you in to your instance for the first time. Brutaldon never stores your username and password; it only uses it to acquire a token which you can disable from the - settings page of your Mastodon instance. + settings page of your Mastodon instance. However, you do need to + absolutely trust the person running this copy of brutaldon! If that's + not the case, use the OAuth login form.

diff --git a/brutaldon/urls.py b/brutaldon/urls.py index 637c312..86d0e41 100644 --- a/brutaldon/urls.py +++ b/brutaldon/urls.py @@ -21,6 +21,7 @@ urlpatterns = [ path('admin/', admin.site.urls), path('home', views.home, name='home'), path('login', views.login, name="login"), + path('oldlogin', views.old_login, name="oldlogin"), path('logout', views.logout, name='logout'), path('oauth_callback', views.oauth_callback, name="oauth_callback"), path('error', views.error, name='error'),