Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최시원
/
Singer-Composer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Mukho
2021-11-25 14:15:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
279d13be11b5602b0b017ec1fa214d91fddd52f8
279d13be
1 parent
d0c876e2
Fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
readme.md
router/profile/index.js
readme.md
View file @
279d13b
...
...
@@ -61,7 +61,7 @@ create table board(
>UPDATE board SET idx = @COUNT:=@COUNT+1;
---
### 최종 수정: 2021-11-25 14:
0
5<br>
### 최종 수정: 2021-11-25 14:
1
5<br>
### 수정 내용:
0.
채팅기능에 버그가 있는 것 같음(undefined님이 나가셨습니다. -> 콘솔에 계속 출력됨) // socket.io의 express-session 호환 문제로 후순위 개발로 미룸
1.
로그에 시간/IP 추가
...
...
router/profile/index.js
View file @
279d13b
...
...
@@ -224,6 +224,8 @@ router.get('/upload', function(req,res){
var
ip
=
requestIp
.
getClientIp
(
req
);
try
{
var
id
=
req
.
user
.
ID
;
var
nickname
=
req
.
user
.
nickname
;
console
.
log
(
logString
+
req
.
user
.
ID
+
'('
+
nickname
+
') 유저가 프로필 열람 중입니다.('
+
ip
+
')'
)
if
(
id
)
res
.
render
(
'uploadprof.ejs'
)
}
catch
{
...
...
@@ -253,7 +255,7 @@ router.post('/upload', upload.single('userfile'), function(req,res){
catch
{
if
(
!
id
){
console
.
log
(
logString
+
'익명 유저의 프로필 사진 업로드 시도를 거부했습니다.('
+
ip
+
')'
)
res
.
send
File
(
path
.
join
(
__dirname
,
"../../public/login.html"
))
res
.
send
(
"<script>alert('로그인이 필요합니다.');opener.location.href='/login';window.close();</script>"
);
}
else
{
console
.
log
(
logString
+
req
.
user
.
ID
+
'('
+
req
.
user
.
nickname
+
') 유저가 파일 업로드 없이 업로드를 시도했습니다.('
+
ip
+
')'
)
...
...
Please
register
or
login
to post a comment