프로그래밍/개발메모

2025-05-17 (토) 개발일지

SIDNFT 2025. 5. 17. 13:03
반응형

일어나보니 웹서버가 죽어있었습니다.

누가 /?XDEBUG_SESSION_START=phpstorm

이런식으로 호출했나봅니다.

phpstorm 의 취약점을 노리는 걸까요

제 express 서버는 없는 파일에 대한 예외처리가 없어서 프로그램이 종료되었습니다.

ENOENT: no such file or directory, open '/home/gunil/pto/node-sidnft-firebase/pi4server/public/?XDEBUG_SESSION_START=phpstorm'
    path: "/home/gunil/pto/node-sidnft-firebase/pi4server/public/?XDEBUG_SESSION_START=phpstorm",
 syscall: "open",
   errno: -2,
    code: "ENOENT"

 

아래에 catch 가 있지만 이곳으로 예외가 오진 않습니다.

fs.createReadStream

함수는 await 로 실행되는게 아니라서 다른 분기를 타는 것이겠지요

전용 에러 처리함수인 on("error" ~~~) f를 추가로 넣었습니다.

 

 

반응형