Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
note-library
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
99f00c14
authored
Feb 20, 2023
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
测试环境部署报错
parent
bb31d074
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
app/Http/Middleware/CheckLogin.php
app/Http/Middleware/CheckLogin.php
View file @
99f00c14
...
@@ -26,7 +26,6 @@ class CheckLogin
...
@@ -26,7 +26,6 @@ class CheckLogin
if
(
$pos
===
0
)
if
(
$pos
===
0
)
$isApi
=
true
;
$isApi
=
true
;
$login
=
Config
::
get
(
'website.login'
);
$login
=
Config
::
get
(
'website.login'
);
if
(
!
$userId
||
!
$skey
||
(
string
)((
int
)
$userId
)
!=
$userId
||
!
preg_match
(
'/^[a-zA-Z0-9]+$/'
,
$skey
))
{
if
(
!
$userId
||
!
$skey
||
(
string
)((
int
)
$userId
)
!=
$userId
||
!
preg_match
(
'/^[a-zA-Z0-9]+$/'
,
$skey
))
{
if
(
$isApi
)
{
if
(
$isApi
)
{
...
@@ -37,7 +36,7 @@ class CheckLogin
...
@@ -37,7 +36,7 @@ class CheckLogin
}
}
$cookie
=
'oa_user_id='
.
$userId
.
'; oa_skey='
.
$skey
;
$cookie
=
'oa_user_id='
.
$userId
.
'; oa_skey='
.
$skey
;
$client
=
new
\GuzzleHttp\Client
();
$client
=
new
\GuzzleHttp\Client
(
[
"idn_conversion"
=>
false
]
);
$rsp
=
$client
->
request
(
'GET'
,
$login
[
'check'
],
[
$rsp
=
$client
->
request
(
'GET'
,
$login
[
'check'
],
[
'headers'
=>
[
'Cookie'
=>
$cookie
],
'headers'
=>
[
'Cookie'
=>
$cookie
],
'connect_timeout'
=>
1
,
'connect_timeout'
=>
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment