Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

import silently fails when opml XML is malformed #313

Open
mblakele opened this issue Dec 11, 2014 · 0 comments
Open

import silently fails when opml XML is malformed #313

mblakele opened this issue Dec 11, 2014 · 0 comments

Comments

@mblakele
Copy link

Unexpected behavior: UI display "OPML import is happening. It can take a minute. Don't reorganize your feeds until it's completed importing. Refresh to see its progress." — but no feeds appear on refresh, or ever.

Expected behavior: UI displays an error message so the user can fix the problem and try again.

This test case should reproduce the problem. Note the unescaped quotes in attributes.

<?xml version="1.0"?>
<opml version="1.0">
  <head>
    <title>feeds export</title>
  </head>
  <body>
    <outline text="fubar "baz""
        title="fubar "baz"" type="rss"
        xmlUrl="https://example.com/feed"/>
</body>
</opml>
mblakele added a commit to mblakele/goread that referenced this issue Dec 13, 2014
This moves the initial XML parsing into the form submit request,
then stores the resulting Opml object as a gob
instead of storing the raw upload bytes.
If the upload is malformed, the request response body
includes a copy of the full error message.
The ajaxform code will show this to the user as a new message.

There may be some risk in moving work into the main request,
because appengine likes requests to be low-latency.
I think it's a reasonable tradeoff, in part because
imports are relatively infrequest.
maddyblue added a commit that referenced this issue Dec 16, 2014
#313 show message when user submits bad OPML
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant