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

Interpreting as Ruby is crashing the browser #1083

Closed
RickyRoller opened this issue Jan 17, 2017 · 1 comment
Closed

Interpreting as Ruby is crashing the browser #1083

RickyRoller opened this issue Jan 17, 2017 · 1 comment

Comments

@RickyRoller
Copy link

I've been running some tests in the Prism test drive demo and I found this issue with the Ruby regex.
When running this code:
The specified key does not exist. (Service: Dat S4; Status Code: 404; Error Code: NoSuchKey; Request ID: 08B41A8484793C19), S4 Request ID: pkxupuByH2m/94Sp6o1I+mYkr2bPXQHPWnPHdzupyeh8gvBjyDkTnCok8LbTtdcishoQ4DNFqos=\n\tat com.swa.http.TestHttpClient.handleErrorResponse(TestHttpClient.java:1078)\n\tat com.swa.http.TestHttpClient.executeOneRequest(TestHttpClient.java:726)\n\tat com.swa.http.TestHttpClient.executeHelper(TestHttpClient.java:461)\n\tat com.swa.http.TestHttpClient.execute(TestHttpClient.java:296)\n\tat com.swa.services.s3.DatS4Client.invoke(DatS4Client.java:3737)\n\tat com.swa.services.s3.DatS4Client.getObject(DatS4Client.java:1164)\n\tat com.swa.services.s3.DatS4Client.getObject(DatS4Client.java:1036)\n\tat com.test.master.devices.s3.S3DeviceImpl$10.execute(S3DeviceImpl.java:493)\n\tat com.test.master.devices.s3.S3DeviceImpl$10.execute(S3DeviceImpl.java:490)\n\tat com.test.master.utility.retryer.Retryer.retry(Retryer.java:35)\n\tat

screen shot 2017-01-17 at 3 30 08 pm

Every time I paste com.test.master.utility.retryer.Retryer.retry(Retryer.java:35)\n\tat at the end of that code snippet, it adds up exponentially. If I paste it 2 more times, it goes up to almost 11 seconds
screen shot 2017-01-17 at 3 34 47 pm

At 3 times it goes up to 45+ seconds

From the screenshots, chrome seems to think that its this regex in the prism-ruby.js. prism-ruby.js:58
(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))

Not sure what it is specifically, that was as far down as I could widdle it and still see the issue.

@Golmote
Copy link
Contributor

Golmote commented Jan 18, 2017

Hi! Thanks for reporting. This should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants