ruby / ruby/rss

What does deactivating the validations do for parsing a rss field?

Open
#73 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
206
Forks
39
PR merge metrics
No merged PRs in 30d

Description

Hello!
I am trying to use this gem to parse RSS feeds. However, many RSS feeds have some data that throws an error such as #<RSS::MissingTagError: tag <link> is missing in tag <image>>. On such rss feed is https://feeds.megaphone.fm/GLT1412515089. Disabling validation fixes those errors (calling RSS::Parser.parse(body, false).
I could not find any documentation for what disabling the validations for parsing actually does. Intuition tells me that it most likely disables validations like the date having a certain format, or some tags existing within other tags, such as the error just shared.
So my question is, what does disabling validations actually do? And is parsing with disabled validations as safe (from a security perpective) as parsing with validations enabled?
Thank you!

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start at the RSS::Parser.parse(body, false) entry point and compare it with parsing the linked feed using validation enabled. Trace which checks the flag changes and document the behavior, including what the issue's security question can be answered from the implementation. Done means the validation behavior and safety implications are explained in the gem's documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.