소스 검색

add some more safety rails on queryParams

tags/2.0.1
Jonathan Cobb 4 년 전
부모
커밋
d1d485b1a8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      src/main/java/org/cobbzilla/util/http/URIUtil.java

+ 1
- 1
src/main/java/org/cobbzilla/util/http/URIUtil.java 파일 보기

@@ -72,7 +72,7 @@ public class URIUtil {

// adapted from https://stackoverflow.com/a/13592567/1251543
public static Map<String, String> queryParams(String query) {
if (empty(query)) return Collections.emptyMap();
if (empty(query) || empty(query.trim()) || query.trim().equals("?")) return Collections.emptyMap();
if (query.contains("?")) query = query.substring(query.indexOf("?")+1);
final Map<String, String> query_pairs = new LinkedHashMap<>();
final String[] pairs = query.split("&");


불러오는 중...
취소
저장