Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The interface of basic data management should be judged by the administrator. #5108

Merged
merged 14 commits into from
May 14, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,40 @@ private static boolean isNotSecurity(String key, String value, String param) {
return key.toLowerCase().contains(param.toLowerCase())
|| value.toLowerCase().contains(param.toLowerCase());
}

/**
* allowLoadLocalInfile=false&autoDeserialize=false&allowLocalInfile=false&allowUrlInLocalInfile=false
*
* @return
*/
public static Properties getMysqlSecurityParams() {
Properties properties = new Properties();
properties.setProperty("allowLoadLocalInfile", "false");
properties.setProperty("autoDeserialize", "false");
properties.setProperty("allowLocalInfile", "false");
properties.setProperty("allowUrlInLocalInfile", "false");
return properties;
}

/**
* Check if the path has a relative path
*
* @param path
* @return
*/
public static boolean containsRelativePath(String path) {
if (path.startsWith("./")
|| path.contains("/./")
|| path.startsWith("../")
|| path.contains("/../")) {
return true;
}
if (path.startsWith(".\\")
|| path.contains("\\.\\")
|| path.startsWith("..\\")
|| path.contains("\\..\\")) {
return true;
}
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class AbstractRetryableProtocol implements RetryableProtocol {

@Override
public long maxPeriod() {
return 3000L;
return 30000L;
}

@Override
Expand All @@ -31,11 +31,11 @@ public Class<? extends Throwable>[] retryExceptions() {

@Override
public int retryNum() {
return 2;
return 5;
}

@Override
public long period() {
return 1000L;
return 10000L;
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package org.apache.linkis.protocol

trait RetryableProtocol extends Protocol {
def retryNum: Int = 2
def period: Long = 1000L
def maxPeriod: Long = 3000L
def retryNum: Int = 5
def period: Long = 10000L
def maxPeriod: Long = 30000L
def retryExceptions: Array[Class[_ <: Throwable]] = Array.empty[Class[_ <: Throwable]]
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
* limitations under the License.
*/

package org.apache.linkis.rpc.loadbalancer;
package org.apache.linkis.protocol

public class GatewayLoadBalancerConfiguration {}
case class UserWithCreator(user: String, creator: String)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading