mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-07-28 13:47:43 +02:00
Update app/common/src/main/java/stirling/software/common/service/SsrfProtectionService.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
dcb07480c6
commit
29e767cb73
@ -199,7 +199,10 @@ public class SsrfProtectionService {
|
||||
}
|
||||
|
||||
private boolean isCloudMetadataAddress(String ip) {
|
||||
// AWS/GCP/Azure metadata endpoints
|
||||
return ip.startsWith("169.254.169.254") || ip.startsWith("fd00:ec2::254");
|
||||
// Cloud metadata endpoints for AWS, GCP, Azure, Oracle Cloud, and IBM Cloud
|
||||
return ip.startsWith("169.254.169.254") // AWS/GCP/Azure
|
||||
|| ip.startsWith("fd00:ec2::254") // AWS IPv6
|
||||
|| ip.startsWith("169.254.169.253") // Oracle Cloud
|
||||
|| ip.startsWith("169.254.169.250"); // IBM Cloud
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user