Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
shuaiguo
5 years ago
Commit
968cc86513e4acdc13c661260ef66b48a34e67f8
1 parent
c401b311
fix(shop): 防止sql攻击 reviewed by yyq
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
apps/product/controllers/shop.js
apps/product/controllers/shop.js
View file @
968cc86
...
...
@@ -25,6 +25,10 @@ exports.index = (req, res, next) => {
_
.
isEmpty
(
req
.
query
)
?
null
:
req
.
query
));
}
if
(
isNaN
(
+
shopId
))
{
return
res
.
redirect
(
301
,
'/404'
);
}
if
(
req
.
xhr
&&
req
.
query
.
_pjax
&&
shopId
)
{
return
req
.
ctx
(
shopModel
).
getShopGoodsData
(
shopId
,
req
.
yoho
.
channel
,
req
.
query
).
then
(
result
=>
{
Object
.
assign
(
result
,
{
...
...
Please
register
or
login
to post a comment