-
Notifications
You must be signed in to change notification settings - Fork 2k
Issue #12577 - Fixing NPE from HttpURI.getDecodedPath() if path doesn't exist #12580
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
Conversation
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
* fix proxy url in web.xml * Issue #12184 Change urls https://eclipse.dev to https://jetty.org Fix #12187 Signed-off-by: Olivier Lamy <[email protected]> --------- Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
…websocketMethodHolder
Signed-off-by: Lachlan Roberts <[email protected]>
…SignInWithEthereum
… into jetty-12.1.x
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
…SignInWithEthereum
Signed-off-by: Lachlan Roberts <[email protected]>
…to upgrade() Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
…0.x. Signed-off-by: Simone Bordet <[email protected]>
Removed deprecated methods from EndPoint. Signed-off-by: Simone Bordet <[email protected]>
The previous semantic of `onCompleteFailure` has been renamed to `onFailure(Throwable)`, which is called immediately (but serialized) on either an abort or a failure. A new `onCompleteFailure(Throwable)` method has been added that is called only after a `failed(throwable)` or a `abort(Throwable)` followed by `succeeded()` or `failed(Throwable)`` No usage has yet been made of the new `onCompleteFailure`, but the ICB implementation has been completely replaced by the one developed in #11876 Signed-off-by: Simone Bordet <[email protected]> Signed-off-by: Ludovic Orban <[email protected]> Co-authored-by: Simone Bordet <[email protected]> Co-authored-by: Ludovic Orban <[email protected]>
Issue #6328 - avoid binding WebSocket MethodHandles
Issue #11560 - Implement EIP-4361 Sign-In With Ethereum
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
* Reworking jetty-compression for JPMS * Moving (include/exclude) verb to before noun * Renaming jetty-compression-api to jetty-compression-common * Renaming module compression-api to compression-common
Signed-off-by: Simone Bordet <[email protected]>
Improved messages used on more modules
Fix #9206 The HttpGenerator persistence was not correctly maintained over intermediate responses. Deprecate tester in EE11 --------- Signed-off-by: Olivier Lamy <[email protected]> Co-authored-by: Olivier Lamy <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
This is the work for the server-side only, the client side will be done in another pull request. Previously, `AbstractConnection.getInvocationType()` was called by `AbstractConnection.ReadCallback`, but it was deprecated and is now removed, along with all its overrides. This mechanism is now replaced by using a specific Callback implementation for each `AbstractConnection` subclass. For example, `HttpConnection` uses `HttpConnection.FillableCallback` that in turn asks the `InvocationType` to the Server, and therefore the `Handler` tree. Introduced `AbstractConnection.NonBlocking` for the cases where `onFillable()` is non-blocking. Restored synchronous code for `ServerFCGIConnection.close()`, ensuring `super.close()` is always called. Ensuring that in `HttpConnection.close()` `super.close()` is always called. Fixed promise notification to avoid race between the task (writing an error response) and the promise (resetting the stream) in HTTP/2 and HTTP/3. Signed-off-by: Simone Bordet <[email protected]> Co-authored-by: Greg Wilkins <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
...tty-ee11-osgi-boot/src/main/java/org/eclipse/jetty/ee11/osgi/boot/OSGiWebappClassLoader.java
Dismissed
Show dismissed
Hide dismissed
| if (osgiUrls != null && osgiUrls.hasMoreElements()) | ||
| return osgiUrls; | ||
|
|
||
| Enumeration<URL> urls = super.getResources(name); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
Copilot Autofix
AI about 1 year ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| @Override | ||
| public URL getResource(String name) | ||
| { | ||
| URL url = _osgiBundleClassLoader.getResource(name); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
Copilot Autofix
AI about 1 year ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| public URL getResource(String name) | ||
| { | ||
| URL url = _osgiBundleClassLoader.getResource(name); | ||
| return url != null ? url : super.getResource(name); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
Copilot Autofix
AI about 1 year ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| @Override | ||
| public URL findResource(String name) | ||
| { | ||
| URL url = _osgiBundleClassLoader.getResource(name); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
Copilot Autofix
AI about 1 year ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| { | ||
|
|
||
| // Couldn't find or see a webapp resource, so try a parent | ||
| URL parentUrl = _parent.getResource(name); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
Copilot Autofix
AI about 1 year ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
|
|
||
| // Perhaps this failed due to leading / | ||
| if (resource == null && name.startsWith("/")) | ||
| resource = getResource(name.substring(1)); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
Copilot Autofix
AI about 1 year ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
|
|
||
| public static String calculate(Path path) throws NoSuchAlgorithmException, IOException | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High test
SHA1
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to replace the use of the SHA-1 algorithm with a stronger algorithm, such as SHA-256. This involves changing the instances where MessageDigest.getInstance("SHA1") is called to use SHA-256 instead. This change will ensure that the cryptographic operations are performed using a more secure and modern algorithm.
-
Copy modified line R74 -
Copy modified line R86 -
Copy modified line R93
| @@ -73,3 +73,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| try (InputStream in = Files.newInputStream(path, StandardOpenOption.READ); | ||
| @@ -85,3 +85,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| digest.update(buf); | ||
| @@ -92,3 +92,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| digest.update(buf, offset, len); |
|
|
||
| public static String calculate(byte[] buf) throws NoSuchAlgorithmException | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High test
SHA1
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we should replace the use of the SHA-1 algorithm with a stronger algorithm, such as SHA-256. This involves updating the MessageDigest.getInstance("SHA1") calls to MessageDigest.getInstance("SHA-256"). This change will ensure that the code uses a modern, secure cryptographic hash function without altering the existing functionality.
-
Copy modified line R74 -
Copy modified line R86 -
Copy modified line R93
| @@ -73,3 +73,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| try (InputStream in = Files.newInputStream(path, StandardOpenOption.READ); | ||
| @@ -85,3 +85,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| digest.update(buf); | ||
| @@ -92,3 +92,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| digest.update(buf, offset, len); |
|
|
||
| public static String calculate(byte[] buf, int offset, int len) throws NoSuchAlgorithmException | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High test
SHA1
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we should replace the use of the SHA-1 algorithm with a stronger algorithm like SHA-256. This involves updating the MessageDigest.getInstance("SHA1") calls to MessageDigest.getInstance("SHA-256"). This change will ensure that the hashing is done using a more secure algorithm without altering the existing functionality of the code.
-
Copy modified line R74 -
Copy modified line R86 -
Copy modified line R93
| @@ -73,3 +73,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| try (InputStream in = Files.newInputStream(path, StandardOpenOption.READ); | ||
| @@ -85,3 +85,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| digest.update(buf); | ||
| @@ -92,3 +92,3 @@ | ||
| { | ||
| MessageDigest digest = MessageDigest.getInstance("SHA1"); | ||
| MessageDigest digest = MessageDigest.getInstance("SHA-256"); | ||
| digest.update(buf, offset, len); |
|
This Branch/PR is just very messed up ATM. |
|
Replacement PR #12591 |
Fixed in
URIUtil.decodePath(String)where the input is null.