원인 : 톰캣이 sessionId 등에서 필요한 난수를 생성할때 SecureRandom클래스에 의존되는데, 이 클래스는 디폴트로 /dev/random을 사용(자원 고갈되면 지연 발생할 수 있음)


해결 : urandom을 사용하도록 처리.

       -Djava.security.egd=file:/dev/./urandom 처리하거나 jre설치된 하위 디렉토리의 java.security 파일에서 수정



참고 : https://wiki.apache.org/tomcat/HowTo/FasterStartUp

페이스북은 캐싱문제로 바로 안나올 수 있음

이런경우 아래 페이스북 사이트에서 공유 디버거로 캐시를 활성화 시켜주면 됩니다.

 

1. https://developers.facebook.com/tools/debug/
 - 참고 : https://developers.facebook.com/docs/sharing/best-practices?locale=ko_KR

 - 주의: og 태그 이미지 파일을 페이스북은 소문자로 읽어가는듯? 이미지 파일을 소문자로 사용하는걸 추천(예. AWS S3에 소문자 파일로 업로드해둠)

 

2. 트위터 Card validator : https://cards-dev.twitter.com/validator 

 

3. 라인 메신저
 - http://poker.line.naver.jp/

 

4. 카카오 메신저

 - https://developers.kakao.com/tool/clear/og

 

기타 SNS업체들 참고 : https://trendw.kr/2015-09251296.t1m

 

 

'기타' 카테고리의 다른 글

메모 - 아파치 OFBIZ  (0) 2019.05.23
nginx limit (rate) 기능으로 요청 트래픽 제한  (1) 2019.01.04
웹 취약점 진단도구 메모  (0) 2018.07.09
좋은 코드 작성하기 참고  (0) 2018.06.29
nginx basic auth 적용  (0) 2017.12.05

웹 취약점 진단도구 메모

진단 도구

용 도

sqlmap

SQL 인젝션 자동화 툴

Fiddler

HTTP 파라미터 변경 및 조작시 사용

EditthisCookie

쿠키값 변조 및 확인 가능

WireShark

네트워크 패킷 모니터링 사용

Burp Suite

HTTP 파라미터 변경 및 조작시 사용


 

일하면서 후배에게 좋은 코드에 대해서 이런저런 얘기들을 해줬었는데,

글로 정리해뒀길래 링크해둡니다.


http://blog.geun.kr/243



P.s 

 - 해당 내용은 제 개인적인 생각이 반영되어 있습니다.

 - 개인적으로는 "7. 잘된 소스 보기" 가 실력을 올리는 가장 빠른 방법인 것도 같습니다.


public class GCTest {
     private final static int ALLOC_SIZE = (int)(Runtime.getRuntime().maxMemory() * 0.50);

     public static void main(String[] args) throws InterruptedException {
          System.out.println("Before first allocation");
          byte[] b = new byte[ALLOC_SIZE];
          b = null; //객체 레퍼런스 주소를 반환 처리함으로써 GC대상에 포함되게 됨(null 처리 안하면 full gc 발생하면서 프로그램 종료됨)
          System.out.println("After first allocation");
          //        Thread.sleep(5000);
          System.out.println("Before second allocation");
          byte[] b2 = new byte[ALLOC_SIZE];
          System.out.println("After second allocation");
     }
}

IOS푸시 발송시 ssl관련 에러

-Djavax.net.debug=all
 매개 변수로 디버거를 연결하면 ssl핸드쉐이크 에러 확인 되고..

https://ko.1answer.info/737461636b6f766572666c6f772e636f6d-7a3435353631353535

http://cbsm.tistory.com/10

* 결론: 인증서를 커맨드로 다시 만들어보자

nginx basic auth 적용

#모듈 설치
yum install -y httpd-tools

#암호용 파일 최초 생성(이후에는 -c옵션을 실행하면 안됨)
htpasswd -c /etc/nginx/.htpasswd id입력
이후에 암호입력함

#생성 확인
cat /etc/nginx/.htpasswd

#nginx location에 아래 내용 추가
auth_basic "message enter";
auth_basic_user_file /etc/nginx/.htpasswd;


http://khaidoan.wikidot.com/amazon-ses

커스텀한 소스코드는 개인 VCS저장소에 보관 중

+ Recent posts