File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,9 @@ impl PluginSettings {
161161 }
162162 if bn_settings. contains ( Self :: SERVER_API_KEY_SETTING ) {
163163 let server_api_key_str = bn_settings. get_string ( Self :: SERVER_API_KEY_SETTING ) ;
164- if !server_api_key_str. is_empty ( ) {
165- settings. server_api_key = Some ( server_api_key_str) ;
164+ let trimmed_server_api_key_str = server_api_key_str. trim ( ) ;
165+ if !trimmed_server_api_key_str. is_empty ( ) {
166+ settings. server_api_key = Some ( trimmed_server_api_key_str. to_string ( ) ) ;
166167 }
167168 }
168169 if bn_settings. contains ( Self :: SECONDARY_SERVER_URL_SETTING ) {
@@ -173,8 +174,9 @@ impl PluginSettings {
173174 }
174175 if bn_settings. contains ( Self :: SECONDARY_SERVER_API_KEY_SETTING ) {
175176 let server_api_key_str = bn_settings. get_string ( Self :: SECONDARY_SERVER_API_KEY_SETTING ) ;
176- if !server_api_key_str. is_empty ( ) {
177- settings. second_server_api_key = Some ( server_api_key_str) ;
177+ let trimmed_server_api_key_str = server_api_key_str. trim ( ) ;
178+ if !trimmed_server_api_key_str. is_empty ( ) {
179+ settings. second_server_api_key = Some ( trimmed_server_api_key_str. to_string ( ) ) ;
178180 }
179181 }
180182 if bn_settings. contains ( Self :: ENABLE_SERVER_SETTING ) {
You can’t perform that action at this time.
0 commit comments