New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scope table not listing items #121
Comments
I can reproduce, I've got the same issue with original pwndoc too (I don't know if you can confirm). |
This issues has only recently appeared in my install, now running pwndoc-ng, original pwndoc install about 6 to 8 weeks old is not impacted upon investigation the export to word shows the scope despite there UI not displaying it. I’ve proxied the calls, there are 2 API responses returned on the page, first one responds wil scope correctly, second responds empty for scope hosts (I’ll update with my requests later as not in front of that machine) |
It looks like we have a regression on the API side (I think it's due to a version bump). I'm currently checking if data is altered before insert or on query. Test on API route
Working version{
"status": "success",
"datas": {
"collaborators": [],
"reviewers": [],
"_id": "6421fdbfc56624001175598f",
"name": "Test",
"language": "fr",
"auditType": "Web",
"creator": {
"_id": "6421fd80c56624001175598a",
"username": "admin",
"firstname": "admin",
"lastname": "admin"
},
"customFields": [],
"template": "6421fd8cc56624001175598c",
"scope": [
"aa",
"bbb"
]
}
} Last version{
"status": "success",
"datas": {
"_id": "6421ff769522ee7a0971f8ae",
"name": "fr",
"auditType": "fr",
"collaborators": [],
"reviewers": [],
"language": "fr",
"template": "6421ff519522ee7a0971f877",
"creator": {
"_id": "6421ff379522ee7a0971f861",
"username": "admin",
"firstname": "admin",
"lastname": "admin"
},
"customFields": [],
"scope": [
{
"hosts": []
},
{
"hosts": []
}
]
}
} |
DB entry is the same on both version (which is coherent with the fact report generation and network section are working). {
"_id": ObjectId("64220c47778ed0b87cb5f705"),
"name": "a",
"auditType": "fr",
"collaborators": [],
"reviewers": [],
"language": "fr",
"template": ObjectId("64220c37778ed0b87cb5f6ed"),
"creator": ObjectId("64220c2d778ed0b87cb5f6d7"),
"sections": [],
"customFields": [],
"sortFindings": [],
"state": "EDIT",
"approvals": [],
"scope": [
{
"name": "aa",
"hosts": []
},
{
"name": "bbb",
"hosts": []
}
],
"findings": [],
"createdAt": ISODate("2023-03-27T21:36:07.524Z"),
"updatedAt": ISODate("2023-03-27T21:36:11.768Z"),
"__v": 0
} |
It may be related to mongoose upgrade ( see pwndoc/pwndoc@af75809#diff-eb434d797b3f5637e7269f5bc9be8842a8e8761c93f3f8347326f9418c746b8cL28 ) , Automattic/mongoose#12325 |
Confirmed the recent commit on pwndoc fixes the scope table issues |
Unfortunately this does not fix it on my side. |
yeah, but if that hasn't been fixed yet in the main branch intself, then pls don't close that bug issue. |
Fixed with #135 |
Describe the bug
When reloading audit, scope items shows as
[Object object]
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Items filled in "scope" field should display their name instead of
[Object object]
.Screenshots
Environment (please complete the following information):
Additional context
Scope name display well in network view. It use to work well in previous version of pwndoc-ng.
The text was updated successfully, but these errors were encountered: