From 1ec09bb56908faa8e1569b3ad13fcc6ecc495db9 Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 17 Mar 2024 10:58:39 +1000 Subject: [PATCH] move the deprecation warning to the comment as it is only used in tests --- core/main/configuration.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/core/main/configuration.rb b/core/main/configuration.rb index 26489651b..7a3f73735 100644 --- a/core/main/configuration.rb +++ b/core/main/configuration.rb @@ -72,10 +72,12 @@ module BeEF return unless validate_public_config_variable?(@config) + # Note for developers: + # The configuration path 'beef.http.public_port' is deprecated. + # Use the new format for public_port variables as described in the BeEF project documentation. + # Refer to the BeEF configuration guide for the web server configuration details: + # https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration if @config['beef']['http']['public_port'] - print_error 'Config path beef.http.public_port is deprecated.' - print_error 'Please use the new format for public variables found' - print_error 'https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration' return end @@ -277,13 +279,15 @@ module BeEF private + # Note for developers: + # The configuration path 'beef.http.public' is deprecated. + # Use the new format for public variables as described in the BeEF project documentation. + # Refer to the BeEF configuration guide for the web server configuration details: + # https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration def validate_public_config_variable?(config) return true if config['beef']['http']['public'].is_a?(Hash) || config['beef']['http']['public'].is_a?(NilClass) - print_error 'Config path beef.http.public is deprecated.' - print_error 'Please use the new format for public variables found' - print_error 'https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration' false end end