Skip to content

Commit 3c18b19

Browse files
committed
Fix bugs in session_notifier.rb
1 parent bb4d6e1 commit 3c18b19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/session_notifier.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ def save_settings_to_config
165165
ini[name]['smtp_from'] = self.smtp_from
166166
ini[name]['sms_number'] = self.sms_number
167167
ini[name]['sms_carrier'] = self.sms_carrier
168-
ini[name]['minimum_ip'] = self.minimum_ip.to_s
169-
ini[name]['maximum_ip'] = self.maximum_ip.to_s
168+
ini[name]['minimum_ip'] = self.minimum_ip.to_s unless self.minimum_ip.blank?
169+
ini[name]['maximum_ip'] = self.maximum_ip.to_s unless self.maximum_ip.blank?
170170
ini.to_file(config_file)
171171
end
172172

@@ -175,7 +175,7 @@ def load_settings_from_config
175175
ini = Rex::Parser::Ini.new(config_file)
176176
group = ini[name]
177177
if group
178-
@sms_carrier = group['sms_carrier'] if group['sms_carrier']
178+
@sms_carrier = group['sms_carrier'].to_sym if group['sms_carrier']
179179
@sms_number = group['sms_number'] if group['sms_number']
180180
@smtp_address = group['smtp_address'] if group['smtp_address']
181181
@smtp_port = group['smtp_port'] if group['smtp_port']

0 commit comments

Comments
 (0)