Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover panic in orgmode.Render if bad orgfile (#4982) #5903

Merged

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Jan 30, 2019

This PR protects against the panic referred to in chaseadamsio/_goorgeous#82
by recovering from the panic and just returning the raw bytes if
there is an error.

Fix #4982 Fix #5430

Signed-off-by: Andrew Thornton art27@cantab.net

This PR protects against the panic referred to in chaseadmsio/goorgeous#82
by recovering from the panic and just returning the raw bytes if
there is an error.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@techknowlogick techknowlogick added this to the 1.8.0 milestone Jan 30, 2019
@codecov-io
Copy link

codecov-io commented Jan 30, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@ca00ca8). Click here to learn what that means.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5903   +/-   ##
=========================================
  Coverage          ?   37.96%           
=========================================
  Files             ?      329           
  Lines             ?    48404           
  Branches          ?        0           
=========================================
  Hits              ?    18378           
  Misses            ?    27385           
  Partials          ?     2641
Impacted Files Coverage Δ
modules/markup/orgmode/orgmode.go 76.92% <50%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca00ca8...6111cc6. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 30, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 30, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 30, 2019
@techknowlogick techknowlogick merged commit 0823791 into go-gitea:master Jan 30, 2019
@lunny
Copy link
Member

lunny commented Jan 31, 2019

Maybe you could send a back port to v1.7?

zeripath added a commit to zeripath/gitea that referenced this pull request Feb 16, 2019
…tea#5903)

This PR protects against the panic referred to in chaseadmsio/goorgeous#82
by recovering from the panic and just returning the raw bytes if
there is an error.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath deleted the fix-4982-panic-on-bad-org-file branch February 16, 2019 17:28
@lafriks lafriks added the backport/done All backports for this PR have been created label Feb 16, 2019
techknowlogick pushed a commit that referenced this pull request Feb 16, 2019
This PR protects against the panic referred to in chaseadmsio/goorgeous#82
by recovering from the panic and just returning the raw bytes if
there is an error.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

org-mode rendering causes gitea crash PANIC: index out of range when viewing org file in repository
6 participants