Bug 1029734 - po header contains invalid entry will cause upload/push failure
po header contains invalid entry will cause upload/push failure
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Usability (Show other bugs)
3.0
Unspecified Linux
medium Severity low
: ---
: 3.7
Assigned To: Patrick Huang
Damian Jansen
: screened
: 1201718 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-12 23:31 EST by Patrick Huang
Modified: 2015-07-21 22:19 EDT (History)
4 users (show)

See Also:
Fixed In Version: 3.7.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-3120)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-21 22:19:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrick Huang 2013-11-12 23:31:12 EST
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
Build Identifier: 

When po file contains entry like:
"\n"
in header section, push or upload will cause an exception. Not much information is given to the user as the entry printed out in error message is literally an empty string.

Reproducible: Always

Steps to Reproduce:
1. Find and create a po file with "\n" in header
2. Push or upload it to zanata
Actual Results:  
Failed to execute goal org.zanata:zanata-maven-plugin:2.0.1:push (default-cli) on project null: Zanata mojo exception: Could not parse header entry: -> [Help 1

Expected Results:  
msgcat does not complain about this invalid header entry. So Zanata probably should just accept it.
Comment 1 Patrick Huang 2013-11-12 23:38:42 EST
Our current accepted header entry is in "key:value\n" format. But I've tried with
"key:\n"
":value:\n"
"\n"
msgcat seems accept them all.
Comment 2 Patrick Huang 2015-03-10 21:16:41 EDT
Should be an easy fix and reduce dev and user's time for troubleshooting this type of errors.
Comment 3 Ding-Yi Chen 2015-03-18 20:44:55 EDT
*** Bug 1201718 has been marked as a duplicate of this bug. ***
Comment 4 Patrick Huang 2015-03-19 20:42:30 EDT
https://github.com/zanata/jgettext/pull/2
Comment 5 Patrick Huang 2015-03-20 02:23:07 EDT
https://github.com/zanata/jgettext/pull/2
Comment 6 Patrick Huang 2015-03-24 23:11:39 EDT
client PR: https://github.com/zanata/zanata-client/pull/56
Comment 7 Patrick Huang 2015-03-25 01:04:42 EDT
server PR: https://github.com/zanata/zanata-server/pull/747
Comment 8 Damian Jansen 2015-03-26 19:27:08 EDT
Verified server (master) at d43744fe01f6d97c15727b33d9944068e04ca624
Verified client (master) at 9fbe0e4395cb2e492f295debc1bee1d55cf0c2f7

Note You need to log in before you can comment on or make changes to this bug.