Skip to content

Commit 9947a9c

Browse files
committed
Merge branch 'contrib' into private-main
2 parents 9329c44 + baa271d commit 9947a9c

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

SECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Reporting and Fixing Security Issues
2+
3+
Please report all security issues to the LaunchDarkly security team by submitting a bug bounty report to our [HackerOne program](https://hackerone.com/launchdarkly?type=team). LaunchDarkly will triage and address all valid security issues following the response targets defined in our program policy. Valid security issues may be eligible for a bounty.
4+
5+
Please do not open issues or pull requests for security issues. This makes the problem immediately visible to everyone, including potentially malicious actors.

src/LaunchDarkly/Impl/Util.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ public static function httpErrorMessage(int $status, string $context, string $re
5959

6060
public static function logExceptionAtErrorLevel(LoggerInterface $logger, \Throwable $e, string $message): void
6161
{
62-
$logger->error($message . ': ' . $e->getMessage());
63-
$logger->debug("$e");
62+
$logger->error(
63+
$message . ': ' . $e->getMessage(),
64+
[
65+
'exception' => $e,
66+
]
67+
);
6468
}
6569

6670
public static function makeNullLogger(): LoggerInterface

src/LaunchDarkly/LDClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,14 @@ private function variationDetailInternal(string $key, LDContext|LDUser $contextO
247247
$result = $errorDetail(EvaluationReason::USER_NOT_SPECIFIED_ERROR);
248248
$sendEvent(new EvalResult($result, false), null);
249249
$error = $context->getError();
250-
$this->_logger->warning("Context was invalid for flag evaluation ($error); returning default value");
250+
251+
$this->_logger->warning(
252+
"Context was invalid for flag evaluation ($error); returning default value",
253+
[
254+
'flag' => $key,
255+
]
256+
);
257+
251258
return $result;
252259
}
253260

0 commit comments

Comments
 (0)