45
46 // Remove token cookie
47 app.delete('/api/users/refreshtoken', function (req, res) {
48 var token = req.cookies['refreshToken']; 49 try {
50 var decoded = jwt.verify(token, jwtRefreshSecret);
51 } catch (err) {
19 // Refresh token
20 app.get('/api/users/refreshtoken', function (req, res) {
21 var userAgent = req.headers['user-agent'];
22 var token = req.cookies['refreshToken']; 23
24 User.updateRefreshToken(token, userAgent)
25 .then(msg => {
12 '/api/users/checktoken',
13 acl.hasPermission('validtoken'),
14 function (req, res) {
15 Response.Ok(res, req.cookies['token']); 16 },
17 );
18
979 );
980 xmlOutput = xmlOutput.replace(
981 '__ModifiedAvailability__',
982 CVSS31.XML_MetricNames['MCIA'][ModifiedAvailability || 'X'], 983 );
984 xmlOutput = xmlOutput.replace(
985 '__EnvironmentalScore__',
975 );
976 xmlOutput = xmlOutput.replace(
977 '__ModifiedIntegrity__',
978 CVSS31.XML_MetricNames['MCIA'][ModifiedIntegrity || 'X'], 979 );
980 xmlOutput = xmlOutput.replace(
981 '__ModifiedAvailability__',
In JavaScript, there are two ways to access the properties of an object:
(object.property)
( Recommended )(object["property"])
( Bad Practice )The dot notation is preferred because it is easier to read, less verbose, and works better with aggressive JavaScript minimizers.
const x = object["property"];
const x = object.property;
x = object[y];