Julia post request 403
-
So i investigated a bit this is what i found the game server is configured correctly and also the webadmin, when i start the game server i receive the post request, this is the content:
POST /cod4x_plugins/julia/ HTTP/1.1
Accept: /
Host: webadmin.relic-gaming.net
User-Agent: CoD4X HTTP-Agent
Connection: Keep-Alive
Content-Length: 274
Content-Type: application/json{
"time":1580464031,
"identkey":"RELIC_SNIPER_KEY1337",
"serverport":28961,
"command":"HELO",
"gamename":"Call of Duty 4 - Modern Warfare X18",
"gamedir":"cod4",
"version":"17.8",
"rcon":"test_rcon"
}which is absolutely correct, now if i reply the current request i got a forbidden error due to csrf:
ForbiddenError: invalid csrf token
at csrf (/home/webadmin/CoD4x-WebAdmin/node_modules/csurf/index.js:112:19)
at Layer.handle [as handle_request] (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:317:13)
at /home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:335:12)
at next (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:275:10)
at /home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:635:15
at next (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:260:14)
at Function.handle (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:174:3)
at router (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:47:12)
at Layer.handle [as handle_request] (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:317:13)
at /home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:335:12)
at next (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:275:10)
at /home/webadmin/CoD4x-WebAdmin/server.js:118:2
at Layer.handle [as handle_request] (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:317:13)
at /home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:335:12)
at next (/home/webadmin/CoD4x-WebAdmin/node_modules/express/lib/router/index.js:275:10)
at /home/webadmin/CoD4x-WebAdmin/app/config/configuration.js:43:5
at tryCatcher (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:673:18)
at PropertiesPromiseArray.PromiseArray._resolve (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise_array.js:127:19)
at PropertiesPromiseArray._promiseFulfilled (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/props.js:78:14)
at Promise._settlePromise (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:609:26)
at Promise._settlePromise0 (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/promise.js:673:18)
at /home/webadmin/CoD4x-WebAdmin/node_modules/bluebird/js/release/nodeback.js:42:21
at /home/webadmin/CoD4x-WebAdmin/node_modules/mongoose/lib/model.js:4798:16
at /home/webadmin/CoD4x-WebAdmin/node_modules/mongoose/lib/utils.js:276:16
at /home/webadmin/CoD4x-WebAdmin/node_modules/mongoose/lib/model.js:4817:21
at _hooks.execPost (/home/webadmin/CoD4x-WebAdmin/node_modules/mongoose/lib/query.js:4364:11)
at /home/webadmin/CoD4x-WebAdmin/node_modules/kareem/index.js:135:16so this is the actual problem
-
I can not access your webadmin page, send me a link to your cod4xwebadmin page pls. 403 error means that it is forbidden. Also let me know if this is a local or external game server on cod4xwebadmin, how did you add it
-
https://webadmin.relic-gaming.net/ this is the link , the game server is remote
-
The link is broken, I can not access it "Service Unavailable" 503 error
-
I add the external gameserver with ip, port, rcon, identitykey for julia and same params are configured on server, plus i enabled steam sso on webadmin and linked my account to steam, then i configured myself as admin for my gameserver, then i start the cod4 server i receive the post but it trigger the csrf error , it's possible that all POST request must include a csrf token as a security measure?
-
It's online again
-
keep the website online and then restart your game server
-
I restarted the game server
-
Jan 31 13:40:12 relic-gaming.net bash[4842]: POST /cod4x_plugins/julia/ 403 118.203 ms - 9036
-
Is there any error on the website console, do you run cod4xwebadmin with npm start? if yes then you should see a POST request in console, is there any error, if yes send it here
-
Error was in the server.cfg file, the julia_identkey was not added