You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using api only 1 metod of deleting ip address works.
Working:
DELETE /api/my_app/addresses/{id}/
Not working:
DELETE /api/my_app/addresses/{ip}/{subnetId}/
phpIPAM version
Phpipam docker image
tested on versions:
[[v1.6.0]]git [69e0e66]
and
[[v1.7.0]] dbversion 41 git [e7e0ebc]
Steps To Reproduce
Please include steps to reproduce the issue:
Use api to get ip details using /api/my_app/addresses/{ip}/{subnetId}/
Try to delete using /api/my_app/addresses/{ip}/{subnetId}/ (not working- No addresses found)
Use motod /api/my_app/addresses/{id}/ to delete ip
Screenshots and error logs
GETTING IP INFO
`curl -X GET https:/phpipam.example.pl/api/example/addresses/172.18.3.201/1056/ --header "token: example" -i
HTTP/2 200
server: nginx
date: Fri, 15 Mar 2024 09:27:51 GMT
content-type: application/json; charset=utf-8
content-length: 414
x-powered-by: PHP/8.2.16
set-cookie: phpipam=example; expires=Sat, 16 Mar 2024 09:27:51 +0000; Max-Age=86400; path=/; SameSite=Lax; HttpOnly;
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-cache
pragma: no-cache
vary: Accept-Encoding
Describe the bug
When using api only 1 metod of deleting ip address works.
Working:
DELETE /api/my_app/addresses/{id}/
Not working:
DELETE /api/my_app/addresses/{ip}/{subnetId}/
phpIPAM version
Phpipam docker image
tested on versions:
[[v1.6.0]]git [69e0e66]
and
[[v1.7.0]] dbversion 41 git [e7e0ebc]
Steps To Reproduce
Please include steps to reproduce the issue:
Screenshots and error logs
GETTING IP INFO
`curl -X GET https:/phpipam.example.pl/api/example/addresses/172.18.3.201/1056/ --header "token: example" -i
HTTP/2 200
server: nginx
date: Fri, 15 Mar 2024 09:27:51 GMT
content-type: application/json; charset=utf-8
content-length: 414
x-powered-by: PHP/8.2.16
set-cookie: phpipam=example; expires=Sat, 16 Mar 2024 09:27:51 +0000; Max-Age=86400; path=/; SameSite=Lax; HttpOnly;
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-cache
pragma: no-cache
vary: Accept-Encoding
{"code":200,"success":true,"data":{"id":113895,"subnetId":1056,"ip_addr":"2886861769","is_gateway":0,"description":null,"hostname":null,"mac":null,"owner":null,"state":2,"switch":null,"location":null,"port":null,"note":null,"lastSeen":"1970-01-01 00:00:01","excludePing":"0","PTRignore":"0","PTR":0,"firewallAddressObject":null,"editDate":"2024-03-15 10:17:35","customer_id":null,"ip":"172.18.3.201"},"time":0.011}`
TRYING TO DELETE USING ALWAYS USED METHOD
`curl -X DELETE https:/phpipam.example.pl/api/example/addresses/172.18.3.201/1056/ --header "token: example" -i
HTTP/2 404
server: nginx
date: Fri, 15 Mar 2024 09:28:02 GMT
content-type: application/json; charset=utf-8
content-length: 72
x-powered-by: PHP/8.2.16
set-cookie: phpipam=example; expires=Sat, 16 Mar 2024 09:28:02 +0000; Max-Age=86400; path=/; SameSite=Lax; HttpOnly;
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-cache
pragma: no-cache
vary: Accept-Encoding
{"code":404,"success":false,"message":"No addresses found","time":0.006}`
DELETED USING DIFFERENT METHOD
`curl -X DELETE https:/phpipam.example.pl/api/example/addresses/113895/ --header "token: example" -i
HTTP/2 200
server: nginx
date: Fri, 15 Mar 2024 09:28:21 GMT
content-type: application/json; charset=utf-8
content-length: 68
x-powered-by: PHP/8.2.16
set-cookie: phpipam=example; expires=Sat, 16 Mar 2024 09:28:21 +0000; Max-Age=86400; path=/; SameSite=Lax; HttpOnly;
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-cache
pragma: no-cache
vary: Accept-Encoding
{"code":200,"success":true,"message":"Address deleted","time":0.012}`
Additional Info
Everything was working fine on version 1.5.4. Checked on 2 different instances with different versions.
The text was updated successfully, but these errors were encountered: