Detect loops in entity resolution

Open
#945 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start by reading the EntityResolver trait and the entity expansion paths it serves; the issue says loop detection must apply to every entity expansion and be coupled to that trait. Decide how immediate loop detection relates to recursion-limit errors, then map the affected expansion paths and tests. Done means loops are detected consistently across entity expansion and the resulting error behavior is covered by tests.

Written by the indexing model from the issue text.

Description

enhancement help wanted

Thoughts on automatic loop detection? (note from previous PR)

Also I've noticed that some implementations detect an entity loop immediately instead of processing until the recursion limit is reached. Should that be two separate errors in your opinion, or one error?

Obviously it would not need to be added in this PR. Just, as a general concept, should an issue be filed for it

Originally posted by @dralley in https://github.com/tafia/quick-xml/pull/943#discussion_r2835819274

The problem, is that loop detection should be applied to any entity expansion, and so should be highly coupled with the EntityResolver trait.

Dominant language
Rust
Stars
1.6k
Forks
299
Avg merge
2d 4h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tafia/quick-xml

All issues in tafia/quick-xml

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.