• Y
  • List All
  • Feedback
    • This Project
    • This Group
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
2025_PROJECT / orgasis star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
orgasissrcmainjavakcccomcmmEgovWebUtil.java
Download as .zip file
File name
Commit message
Commit date
src/main
메뉴관리 > eng 영역 추가
02-04
.gitignore
5648 관리자 메인비주얼관리 수정
01-26
GEMINI.md
메뉴관리 > eng 영역 추가
02-04
README.md
first commit
2025-12-11
pom.xml
first commit
2025-12-11
File name
Commit message
Commit date
java/kcc
메뉴관리 > eng 영역 추가
02-04
resources
메뉴관리 > eng 영역 추가
02-04
webapp
메뉴관리 > eng 영역 추가
02-04
File name
Commit message
Commit date
com
팝업관리 오류 수정
01-29
let
메뉴관리 > eng 영역 추가
02-04
web
메뉴관리 > eng 영역 추가
02-04
xxx
first commit
2025-12-11
File name
Commit message
Commit date
cmm
포토 getImage.do 컨트롤러 이동
01-28
sym/log/ulg
first commit
2025-12-11
uss/ion
팝업관리 오류 수정
01-29
utl
first commit
2025-12-11
File name
Commit message
Commit date
aspect
first commit
2025-12-11
captcha
first commit
2025-12-11
exception
first commit
2025-12-11
filter
first commit
2025-12-11
interceptor
first commit
2025-12-11
service
first commit
2025-12-11
spring
first commit
2025-12-11
taglibs
first commit
2025-12-11
util
first commit
2025-12-11
web
포토 getImage.do 컨트롤러 이동
01-28
AltibaseClobStringTypeHandler.java
first commit
2025-12-11
CmmUtil.java
first commit
2025-12-11
ComDefaultCodeVO.java
first commit
2025-12-11
ComDefaultVO.java
first commit
2025-12-11
EgovComCrossSiteHndlr.java
first commit
2025-12-11
EgovComExcepHndlr.java
first commit
2025-12-11
EgovComOthersExcepHndlr.java
first commit
2025-12-11
EgovComTraceHandler.java
first commit
2025-12-11
EgovMessageSource.java
first commit
2025-12-11
EgovMultiPartEmail.java
first commit
2025-12-11
EgovWebUtil.java
first commit
2025-12-11
ImagePaginationRenderer.java
first commit
2025-12-11
ImagePaginationRendererWeb.java
first commit
2025-12-11
JsonResult.java
first commit
2025-12-11
LoginVO.java
first commit
2025-12-11
ReadVO.java
first commit
2025-12-11
SessionVO.java
first commit
2025-12-11
UserVO.java
first commit
2025-12-11
hehihoho3@gmail.com 2025-12-11 03b6c6a first commit UNIX
Raw Open in browser Change history
package kcc.com.cmm; import java.util.regex.Pattern; /** * 교차접속 스크립트 공격 취약성 방지(파라미터 문자열 교체) * * <pre> * << 개정이력(Modification Information) >> * * 수정일 수정자 수정내용 * ------- -------- --------------------------- * 2011.10.10 한성곤 최초 생성 * * </pre> */ public class EgovWebUtil { public static String clearXSSMinimum(String value) { if (value == null || value.trim().equals("")) { return ""; } String returnValue = value; returnValue = returnValue.replaceAll("&", "&amp;"); returnValue = returnValue.replaceAll("<", "&lt;"); returnValue = returnValue.replaceAll(">", "&gt;"); returnValue = returnValue.replaceAll("\"", "&#34;"); returnValue = returnValue.replaceAll("\'", "&#39;"); returnValue = returnValue.replaceAll("[.]", "&#46;"); returnValue = returnValue.replaceAll("%2E", "&#46;"); returnValue = returnValue.replaceAll("%2F", "&#47;"); return returnValue; } public static String clearXSSMaximum(String value) { String returnValue = value; returnValue = clearXSSMinimum(returnValue); returnValue = returnValue.replaceAll("%00", null); returnValue = returnValue.replaceAll("%", "&#37;"); // \\. => . returnValue = returnValue.replaceAll("\\.\\./", ""); // ../ returnValue = returnValue.replaceAll("\\.\\.\\\\", ""); // ..\ returnValue = returnValue.replaceAll("\\./", ""); // ./ returnValue = returnValue.replaceAll("%2F", ""); return returnValue; } public static String filePathBlackList(String value) { String returnValue = value; if (returnValue == null || returnValue.trim().equals("")) { return ""; } returnValue = returnValue.replaceAll("\\.\\./", ""); // ../ returnValue = returnValue.replaceAll("\\.\\.\\\\", ""); // ..\ return returnValue; } /** * 행안부 보안취약점 점검 조치 방안. * * @param value * @return */ public static String filePathReplaceAll(String value) { String returnValue = value; if (returnValue == null || returnValue.trim().equals("")) { return ""; } returnValue = returnValue.replaceAll("/", ""); returnValue = returnValue.replaceAll("\\", ""); returnValue = returnValue.replaceAll("\\.\\.", ""); // .. returnValue = returnValue.replaceAll("&", ""); return returnValue; } public static String filePathWhiteList(String value) { return value; } public static boolean isIPAddress(String str) { Pattern ipPattern = Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); return ipPattern.matcher(str).matches(); } public static String removeCRLF(String parameter) { return parameter.replaceAll("\r", "").replaceAll("\n", ""); } public static String removeSQLInjectionRisk(String parameter) { return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("%", "").replaceAll(";", "").replaceAll("-", "").replaceAll("\\+", "").replaceAll(",", ""); } public static String removeOSCmdRisk(String parameter) { return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("|", "").replaceAll(";", ""); } }

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up