free-be-account 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -1
- package/package.json +1 -1
- package/routers/uc/info/route.js +6 -1
package/index.js
CHANGED
|
@@ -1676,7 +1676,8 @@ module.exports = (app) => ({
|
|
|
1676
1676
|
return false;
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
|
-
const
|
|
1679
|
+
const pdfjsReg = new RegExp(`^${app.config.frontendPublicPath || ''}\/pdfjs(_.+)?\/web\/viewer.html$`);
|
|
1680
|
+
const refererMatched = pdfjsReg.test(refererPath) || neededReferer.split(/,|,/).map((nr) => new RegExp(nr)).some((reg) => reg.test(refererPath));
|
|
1680
1681
|
|
|
1681
1682
|
if (!refererMatched) {
|
|
1682
1683
|
return false;
|
package/package.json
CHANGED
package/routers/uc/info/route.js
CHANGED
|
@@ -42,7 +42,12 @@ router.put('/', async (req, res, next) => {
|
|
|
42
42
|
res.locals.filter = { id: user.id };
|
|
43
43
|
// get new data from request (now only profile can be updated in uc)
|
|
44
44
|
if (req.body.Profile) {
|
|
45
|
-
res.locals.body = {
|
|
45
|
+
res.locals.body = {
|
|
46
|
+
Profile: {
|
|
47
|
+
...user.Profile,
|
|
48
|
+
...req.body.Profile,
|
|
49
|
+
}
|
|
50
|
+
};
|
|
46
51
|
} else {
|
|
47
52
|
res.locals.body = { Enabled: user.Enabled };
|
|
48
53
|
}
|