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

Use modern-ish jetty #377

Merged
merged 1 commit into from
Oct 8, 2019
Merged

Use modern-ish jetty #377

merged 1 commit into from
Oct 8, 2019

Conversation

Ancient123
Copy link

Fixes #233
Works towards #130

@Ancient123 Ancient123 requested a review from a team as a code owner October 4, 2019 22:03
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Oct 4, 2019
@@ -4,7 +4,7 @@
<parent>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-parent</artifactId>
<version>1.30.4-SNAPSHOT</version><!-- {x-version-update:google-oauth-client:current} -->
<version>1.30.3</version><!-- {x-version-update:google-oauth-client:current} -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should have changed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

<artifactId>jetty</artifactId>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>8.2.0.v20160908</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a dependencyManagement section somewhere needs to be updated?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the upstream reference in the main pom.xml and fixed it there.

@@ -118,7 +118,9 @@ public String getRedirectUri() throws IOException {
server = new Server(port != -1 ? port : 0);
Connector connector = server.getConnectors()[0];
connector.setHost(host);
server.addHandler(new CallbackHandler());
//Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the commented lines

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -254,7 +256,7 @@ public Builder setLandingPages(String successLandingPageUrl, String failureLandi

@Override
public void handle(
String target, HttpServletRequest request, HttpServletResponse response, int dispatch)
String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a change in public API, which we are loath to do. Can the old method be retained and add this one, maybe one with a delegate to the other?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea how to to that!
But, I figured after 4 years of there being a request to update a decade old highly vulnerable package ( [CVE-2011-4461][CVE-2017-7656][CVE-2017-7657][CVE-2017-7658][CVE-2017-9735][CVE-2019-10241][CVE-2019-10247] ) I might atleast post a PR to get some traction on the issue.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also:
This is public within class CallbackHandler which is not public. I am guessing that this is only exposed to the LocalServerReceiver class that it is nested within. Although my knowledge of java is garbage so I may be completely wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the class is non-public, that's OK then.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is one style issue I am creating. I will try and fix it. Please re-run kokoro.

@elharo elharo added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 5, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 5, 2019
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Oct 5, 2019
@Ancient123 Ancient123 requested a review from elharo October 7, 2019 16:47
@elharo elharo added kokoro:force-run Add this label to force Kokoro to re-run the tests. semver: patch A minor bug fix or small change. labels Oct 7, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 7, 2019
@elharo elharo added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 7, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 7, 2019
@Ancient123
Copy link
Author

Yay everything passes!

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term I wonder if we should be using Jetty at all. It might be overkill for what we need. For now, though, this seems like an improvement.

@chingor13 Any final comments here?

@chingor13
Copy link
Contributor

We don't have this version of jetty internally (we do have 9.4.x) so we won't be able to import this in. We should likely update to 9.4 before we attempt to import it internally.

Copy link
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is better than the alternative of leaving the old jetty.

@chingor13 chingor13 merged commit 6584664 into googleapis:master Oct 8, 2019
@Ancient123
Copy link
Author

I am still looking at migrating to 9.4.x but the 8 => 9 upgrade is pretty non-trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. semver: patch A minor bug fix or small change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade jetty version
5 participants