From 2ea4b6b63d5552208e78dab253ea43083ad9f92d Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 8 Jul 2021 20:22:02 -0700 Subject: [PATCH] Remove basic auth setting --- data/interfaces/default/settings.html | 21 ++++----------------- plexpy/webauth.py | 2 +- plexpy/webserve.py | 3 +-- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 1b96a2ea..f35bcb07 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -664,13 +664,6 @@

Password for web server authentication. Leave empty to disable.

-
- -

Use basic HTTP authentication instead of the HTML login form.

-
-
@@ -2873,10 +2866,7 @@ $(document).ready(function() { }); function allowPlexAdminCheck () { - if ($("#http_basic_auth").is(":checked")) { - $("#http_plex_admin").attr("checked", false).attr("disabled", true); - $("#allowPlexCheck").html("Plex admin login cannot be enabled with basic authentication."); - } else if ($('#http_username').val() == '' || $('#http_password').val() == '') { + if ($('#http_username').val() == '' || $('#http_password').val() == '') { $("#http_plex_admin").attr("checked", false).attr("disabled", true); $("#allowPlexCheck").html("You must set an admin username and password above to allow Plex admin login."); } else { @@ -2886,15 +2876,12 @@ $(document).ready(function() { } allowPlexAdminCheck(); - $('#http_username, #http_password, #http_basic_auth').change(function () { + $('#http_username, #http_password').change(function () { allowPlexAdminCheck(); }); function allowGuestAccessCheck () { - if ($("#http_basic_auth").is(":checked")) { - $("#allow_guest_access").attr("checked", false).attr("disabled", true); - $("#allowGuestCheck").html("Guest access cannot be enabled with basic authentication."); - } else if ($('#http_username').val() == '' || $('#http_password').val() == '') { + if ($('#http_username').val() == '' || $('#http_password').val() == '') { $("#allow_guest_access").attr("checked", false).attr("disabled", true); $("#allowGuestCheck").html("You must set an admin username and password above to allow guest access."); } else { @@ -2905,7 +2892,7 @@ $(document).ready(function() { } allowGuestAccessCheck(); - $('#http_username, #http_password, #http_basic_auth').change(function () { + $('#http_username, #http_password').change(function () { allowGuestAccessCheck(); }); diff --git a/plexpy/webauth.py b/plexpy/webauth.py index e081c0a7..414a69e5 100644 --- a/plexpy/webauth.py +++ b/plexpy/webauth.py @@ -276,7 +276,7 @@ def check_rate_limit(ip_address): class AuthController(object): def check_auth_enabled(self): - if not plexpy.CONFIG.HTTP_BASIC_AUTH and plexpy.CONFIG.HTTP_PASSWORD: + if plexpy.CONFIG.HTTP_PASSWORD: return raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index cdd90414..8e1baa6b 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -3135,7 +3135,6 @@ class WebInterface(object): config = { "allow_guest_access": checked(plexpy.CONFIG.ALLOW_GUEST_ACCESS), "history_table_activity": checked(plexpy.CONFIG.HISTORY_TABLE_ACTIVITY), - "http_basic_auth": checked(plexpy.CONFIG.HTTP_BASIC_AUTH), "http_host": plexpy.CONFIG.HTTP_HOST, "http_username": plexpy.CONFIG.HTTP_USERNAME, "http_port": plexpy.CONFIG.HTTP_PORT, @@ -3273,7 +3272,7 @@ class WebInterface(object): "notify_new_device_initial_only", "notify_server_update_repeat", "notify_plexpy_update_repeat", "monitor_pms_updates", "get_file_sizes", "log_blacklist", - "allow_guest_access", "cache_images", "http_proxy", "http_basic_auth", "notify_concurrent_by_ip", + "allow_guest_access", "cache_images", "http_proxy", "notify_concurrent_by_ip", "history_table_activity", "plexpy_auto_update", "themoviedb_lookup", "tvmaze_lookup", "musicbrainz_lookup", "http_plex_admin", "newsletter_self_hosted", "newsletter_inline_styles", "sys_tray_icon"