Coder Social home page Coder Social logo

Comments (8)

jens-maus avatar jens-maus commented on June 16, 2024

Sorry, but our testframework does not show any problem/issue regarding 7.1.61. See here:

https://github.com/jens-maus/node-unifi/runs/6255467306?check_suite_focus=true#step:6:34

This shows that all tests are correctly executed with a live 7.1.61 installation running.

from node-unifi.

NebzHB avatar NebzHB commented on June 16, 2024

No issue on software controller, only on cloudkeys

from node-unifi.

NebzHB avatar NebzHB commented on June 16, 2024

maybe they forbid access to getDeviceNameMappings (bundles.json) on cloudkeys...

from node-unifi.

NebzHB avatar NebzHB commented on June 16, 2024

it seems the file needs auth on CloudKeys now...

from node-unifi.

NebzHB avatar NebzHB commented on June 16, 2024

same with logout or any action in fact...

ERROR Stop:  Error: Request failed with status code 403
at createError (/var/www/html/plugins/unifi/resources/node_modules/node-unifi/node_modules/axios/lib/core/createError.js:16:15)
at settle (/var/www/html/plugins/unifi/resources/node_modules/node-unifi/node_modules/axios/lib/core/settle.js:17:12)
at /var/www/html/plugins/unifi/resources/node_modules/node-unifi/node_modules/axios-cookiejar-support/lib/interceptors/response.js:83:25
at new Promise (<anonymous>)
at responseInterceptor (/var/www/html/plugins/unifi/resources/node_modules/node-unifi/node_modules/axios-cookiejar-support/lib/interceptors/response.js:82:9)
at /var/www/html/plugins/unifi/resources/node_modules/node-unifi/node_modules/axios-cookiejar-support/lib/index.js:130:67
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
config: {
url: 'https://192.168.1.8/api/auth/logout',
method: 'post',
data: null,
headers: {
Accept: 'application/json, text/plain, */*',
'X-CSRF-Token': 'aaaaaaaa-2e71-4d99-be44-8d2daa4b7dd7',
'Content-Type': 'application/x-www-form-urlencoded',
Cookie: 'TOKEN=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.eyJ1c2VySWQiOiIwNWE5YWJiMi1hYmE1LTQ1YjMtYTc2MS0wOWJlYjQ2YWU2NDEiLCJjc3JmVG9rZW4iOiI1MzQ5MDBlMC0yMjc5LTRiZjAtYWE0Mi0xNWU3MTdhMjg5NDYiLCJqdGkiOiJkYmZmMWQwMS02ZjZjLTRkNDAtYTMyMS1mYjhhZTQxNmI0OTgiLCJwYXNzd29yZFJldmlzaW9uIjoxNjEyMzEwNjQ2LCJpYXQiOjE2NTIzNDU4NDUsImV4cCI6MTY1MjM0OTQ0NX0.MQlM5WHdZKw4hvEDc06fDNmnh6oHiZTaMO76Kx2Z3ao',
'User-Agent': 'axios/0.21.4'
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
withCredentials: true,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
httpsAgent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: {},
freeSockets: [Object],
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
jar: CookieJar {
rejectPublicSuffixes: true,
enableLooseMode: false,
allowSpecialUseDomain: false,
store: { idx: {
'192.168.1.8': {
'/': {
TOKEN: Cookie="TOKEN=AAAAAAAAAAAAAAAAAAAA.eyJ1c2VySWQiOiIwNWE5YWJiMi1hYmE1LTQ1YjMtYTc2MS0wOWJlYjQ2YWU2NDEiLCJjc3JmVG9rZW4iOiI1MzQ5MDBlMC0yMjc5LTRiZjAtYWE0Mi0xNWU3MTdhMjg5NDYiLCJqdGkiOiJkYmZmMWQwMS02ZjZjLTRkNDAtYTMyMS1mYjhhZTQxNmI0OTgiLCJwYXNzd29yZFJldmlzaW9uIjoxNjEyMzEwNjQ2LCJpYXQiOjE2NTIzNDU4NDUsImV4cCI6MTY1MjM0OTQ0NX0.MQlM5WHdZKw4hvEDc06fDNmnh6oHiZTaMO76Kx2Z3ao; Path=/; Secure; HttpOnly; hostOnly=true; aAge=9ms; cAge=24436111ms"
}
}
} },
prefixSecurity: 'silent',
_cloneSync: [Function (anonymous)],
_importCookiesSync: [Function (anonymous)],
getCookiesSync: [Function (anonymous)],
getCookieStringSync: [Function (anonymous)],
getSetCookieStringsSync: [Function (anonymous)],
removeAllCookiesSync: [Function (anonymous)],
setCookieSync: [Function (anonymous)],
serializeSync: [Function (anonymous)]
},
maxRedirects: 0,
validateStatus: [Function: validateStatus]
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype] {
error: [Function: handleRequestError],
prefinish: [Function: requestOnPrefinish]
},
_eventsCount: 2,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: false,
alpnProtocol: false,
authorized: false,
authorizationError: 'DEPTH_ZERO_SELF_SIGNED_CERT',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: null,
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: null,
timeout: 0,
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: -1,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
},
_header: 'POST /api/auth/logout HTTP/1.1
' +
'Accept: application/json, text/plain, */*
' +
'X-CSRF-Token: aaaaaaaa-2e71-4d99-be44-8d2daa4b7dd7
' +
'Content-Type: application/x-www-form-urlencoded
' +
'Cookie: TOKEN=AAAAAAAAAAAAAAAAAAAAAAAAAA.eyJ1c2VySWQiOiIwNWE5YWJiMi1hYmE1LTQ1YjMtYTc2MS0wOWJlYjQ2YWU2NDEiLCJjc3JmVG9rZW4iOiI1MzQ5MDBlMC0yMjc5LTRiZjAtYWE0Mi0xNWU3MTdhMjg5NDYiLCJqdGkiOiJkYmZmMWQwMS02ZjZjLTRkNDAtYTMyMS1mYjhhZTQxNmI0OTgiLCJwYXNzd29yZFJldmlzaW9uIjoxNjEyMzEwNjQ2LCJpYXQiOjE2NTIzNDU4NDUsImV4cCI6MTY1MjM0OTQ0NX0.MQlM5WHdZKw4hvEDc06fDNmnh6oHiZTaMO76Kx2Z3ao
' +
'User-Agent: axios/0.21.4
' +
'Host: 192.168.1.8
' +
'Connection: keep-alive
' +
'Content-Length: 0
' +
'
',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: {},
freeSockets: [Object],
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/auth/logout',
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
socket: null,
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 403,
statusMessage: 'Forbidden',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(RequestTimeout)]: undefined
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: true,
host: '192.168.1.8',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'x-csrf-token': [Array],
'content-type': [Array],
cookie: [Array],
'user-agent': [Array],
host: [Array]
}
},
response: {
status: 403,
statusText: 'Forbidden',
headers: {
vary: 'Origin',
'x-dns-prefetch-control': 'off',
'x-frame-options': 'SAMEORIGIN',
'strict-transport-security': 'max-age=15552000; includeSubDomains',
'x-download-options': 'noopen',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1; mode=block',
'accept-ranges': 'bytes',
'content-type': 'application/json; charset=utf-8',
'x-response-time': '1ms',
'content-length': '32',
date: 'Thu, 12 May 2022 08:57:25 GMT',
connection: 'keep-alive'
},
config: {
url: 'https://192.168.1.8/api/auth/logout',
method: 'post',
data: null,
headers: [Object],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
withCredentials: true,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
httpsAgent: [Agent],
transitional: [Object],
jar: [CookieJar],
maxRedirects: 0,
validateStatus: [Function: validateStatus]
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
_header: 'POST /api/auth/logout HTTP/1.1
' +
'Accept: application/json, text/plain, */*
' +
'X-CSRF-Token: aaaaaaaa-2e71-4d99-be44-8d2daa4b7dd7
' +
'Content-Type: application/x-www-form-urlencoded
' +
'Cookie: TOKEN=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.eyJ1c2VySWQiOiIwNWE5YWJiMi1hYmE1LTQ1YjMtYTc2MS0wOWJlYjQ2YWU2NDEiLCJjc3JmVG9rZW4iOiI1MzQ5MDBlMC0yMjc5LTRiZjAtYWE0Mi0xNWU3MTdhMjg5NDYiLCJqdGkiOiJkYmZmMWQwMS02ZjZjLTRkNDAtYTMyMS1mYjhhZTQxNmI0OTgiLCJwYXNzd29yZFJldmlzaW9uIjoxNjEyMzEwNjQ2LCJpYXQiOjE2NTIzNDU4NDUsImV4cCI6MTY1MjM0OTQ0NX0.MQlM5WHdZKw4hvEDc06fDNmnh6oHiZTaMO76Kx2Z3ao
' +
'User-Agent: axios/0.21.4
' +
'Host: 192.168.1.8
' +
'Connection: keep-alive
' +
'Content-Length: 0
' +
'
',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/auth/logout',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: true,
host: '192.168.1.8',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
data: { message: 'Invalid CSRF Token' }
},
isAxiosError: true,
toJSON: [Function: toJSON]
}

from node-unifi.

NebzHB avatar NebzHB commented on June 16, 2024

thx !

from node-unifi.

jens-maus avatar jens-maus commented on June 16, 2024

Does it work now with 2.0.5?

from node-unifi.

NebzHB avatar NebzHB commented on June 16, 2024

My users are trying, I keep you up to date when i have feedback.

from node-unifi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.