Skip to content

Commit

Permalink
abort setting proxy when either host or port is not valid
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky authored and alperozturk96 committed May 2, 2024
1 parent fe901da commit bf70ccd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package com.owncloud.android.utils.appConfig
import android.content.Context
import android.content.res.Resources
import android.os.Bundle
import android.text.TextUtils
import com.owncloud.android.R
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory
import com.owncloud.android.lib.common.utils.Log_OC
Expand All @@ -36,7 +37,7 @@ class AppConfigManager(private val context: Context, private val appRestrictions
context.resources.getInteger(R.integer.proxy_port)
}

if (host == null) {
if (TextUtils.isEmpty(host) || port == -1) {
Log_OC.d(tag, "Proxy configuration cannot be found")
return
}
Expand Down

0 comments on commit bf70ccd

Please sign in to comment.