dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
776 stars 145 forks source link

502 should be 400 #6978

Open sigurdm opened 1 year ago

sigurdm commented 1 year ago

When serving https://pub.dev/$%7B%23context['xwork.MethodAccessor.denyMethodExecution']=!(%23_memberAccess['allowStaticMethodAccess']=true),(@java.lang.Runtime@getRuntime()).exec('ipconfig').waitFor()%7D.action

isoos commented 1 year ago

Copy-pasting that link gives me 404, and I think that is almost as good as 400 in this case. Do we have the log entry about this 503?

sigurdm commented 1 year ago

Found the log entry - seems it was a 502:

{
  "insertId": "1sdeeqlg252p4zp",
  "jsonPayload": {
    "backendTargetProjectNumber": "projects/475963186251",
    "cacheDecision": [
      "RESPONSE_HAS_CONTENT_TYPE",
      "CACHE_MODE_USE_ORIGIN_HEADERS"
    ],
    "@type": "type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry",
    "remoteIp": "42.118.107.124",
    "statusDetails": "response_sent_by_backend"
  },
  "httpRequest": {
    "requestMethod": "GET",
    "requestUrl": "https://pub.dev/$%7B%23context['xwork.MethodAccessor.denyMethodExecution']=!(%23_memberAccess['allowStaticMethodAccess']=true),(@java.lang.Runtime@getRuntime()).exec('ipconfig').waitFor()%7D.action",
    "requestSize": "2425",
    "status": 502,
    "responseSize": "695",
    "userAgent": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)",
    "remoteIp": "42.118.107.124",
    "serverIp": "10.128.0.144"
  },
  "resource": {
    "type": "http_load_balancer",
    "labels": {
      "target_proxy_name": "",
      "project_id": "dartlang-pub",
      "forwarding_rule_name": "",
      "url_map_name": "",
      "zone": "global",
      "backend_service_name": "aef-default-20230822t112400-bs"
    }
  },
  "timestamp": "2023-08-28T05:53:25.598404Z",
  "severity": "WARNING",
  "logName": "projects/dartlang-pub/logs/requests",
  "trace": "projects/dartlang-pub/traces/6107bb948d5b597bc33586e143cafbbe",
  "receiveTimestamp": "2023-08-28T05:53:26.210686572Z",
  "spanId": "1d7f930fa98dd736"
}
sigurdm commented 1 year ago

I also get 404 if I paste the link... not sure what goes on.