Skip to content

Commit 1ec09bb

Browse files
author
Stephen
committed
move the deprecation warning to the comment as it is only used in tests
1 parent 0b6e759 commit 1ec09bb

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Diff for: core/main/configuration.rb

+10-6
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ def validate
7272

7373
return unless validate_public_config_variable?(@config)
7474

75+
# Note for developers:
76+
# The configuration path 'beef.http.public_port' is deprecated.
77+
# Use the new format for public_port variables as described in the BeEF project documentation.
78+
# Refer to the BeEF configuration guide for the web server configuration details:
79+
# https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration
7580
if @config['beef']['http']['public_port']
76-
print_error 'Config path beef.http.public_port is deprecated.'
77-
print_error 'Please use the new format for public variables found'
78-
print_error 'https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration'
7981
return
8082
end
8183

@@ -277,13 +279,15 @@ def load_modules_config
277279

278280
private
279281

282+
# Note for developers:
283+
# The configuration path 'beef.http.public' is deprecated.
284+
# Use the new format for public variables as described in the BeEF project documentation.
285+
# Refer to the BeEF configuration guide for the web server configuration details:
286+
# https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration
280287
def validate_public_config_variable?(config)
281288
return true if config['beef']['http']['public'].is_a?(Hash) ||
282289
config['beef']['http']['public'].is_a?(NilClass)
283290

284-
print_error 'Config path beef.http.public is deprecated.'
285-
print_error 'Please use the new format for public variables found'
286-
print_error 'https://github.com/beefproject/beef/wiki/Configuration#web-server-configuration'
287291
false
288292
end
289293
end

0 commit comments

Comments
 (0)