Skip to content

Conversation

phebing
Copy link

@phebing phebing commented Sep 16, 2025

This PR updates the ConfluenceLoader to use the other cql search api which actually supports the Parameter includeArchivedSpaces and
fixes #328

I am not very sure if the switch to that other search api breaks or slows down the code, but in my use case it looks fine so far.

…which supports the includeArchivedSpaces parameter
pages = []
for item in results:
# return the content field of each result object
pages.append(item["content"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KeyError vulnerability: The code assumes every result item has a 'content' field without validation. If the API returns results without this field, the code will crash with a KeyError. Add a safety check: if 'content' in item: pages.append(item['content']) or use item.get('content') with appropriate handling for missing content.

Suggested change
pages.append(item["content"])
if "content" in item:
pages.append(item["content"])

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConfluenceLoader does not work on archived spaces when using cql
1 participant