fix: 포트 충돌 회피 — note_bridge 8098, intent_service 8099
Jellyfin(8096), OrbStack(8097) 포트 충돌으로 변경. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""This is a collection of test files that are generated from the fuzzer.
|
||||
|
||||
The fuzzer finds the cases in which the icalendar module breaks.
|
||||
These test cases reproduce the failure.
|
||||
Some more tests can be added to make sure that the behavior works properly.
|
||||
"""
|
||||
|
||||
|
||||
def fuzz_calendar_v1(
|
||||
from_ical, calendar_string: str, multiple: bool, should_walk: bool
|
||||
):
|
||||
"""Take a from_ical function and reproduce the error.
|
||||
|
||||
The calendar_string is a fuzzed input.
|
||||
"""
|
||||
cal = from_ical(calendar_string, multiple=multiple)
|
||||
|
||||
if not multiple:
|
||||
cal = [cal]
|
||||
for c in cal:
|
||||
if should_walk:
|
||||
for event in c.walk("VEVENT"):
|
||||
event.to_ical()
|
||||
else:
|
||||
c.to_ical()
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script generates a test case from a test case file that was downloaded.
|
||||
#
|
||||
# You will need to follow the setup instructions here:
|
||||
# https://google.github.io/oss-fuzz/advanced-topics/reproducing/#reproduce-using-local-source-checkout
|
||||
#
|
||||
set -e
|
||||
|
||||
HERE="`dirname \"$0\"`"
|
||||
OSS_FUZZ_DIRECTORY="$HOME/oss-fuzz"
|
||||
DOWNLOADS_DIRECTORY="$HOME/Downloads"
|
||||
LOCAL_ICALENDAR_DIRECTORY="$HERE/../../../../"
|
||||
PYTHON_TEST_CASE_DIRECTORY="$HERE/../calendars/"
|
||||
PROJECT_NAME="icalendar"
|
||||
|
||||
echo "### Building Project $PROJECT_NAME"
|
||||
python "$OSS_FUZZ_DIRECTORY/infra/helper.py" build_fuzzers --sanitizer undefined "$PROJECT_NAME" "$LOCAL_ICALENDAR_DIRECTORY"
|
||||
|
||||
# we capture the output
|
||||
OUTPUT="`mktemp`"
|
||||
|
||||
# test case files look like this:
|
||||
# clusterfuzz-testcase-minimized-ical_fuzzer-4878676239712256
|
||||
for testcase in "$DOWNLOADS_DIRECTORY/clusterfuzz-testcase-"*
|
||||
do
|
||||
echo "### Reproducing $testcase"
|
||||
python "$OSS_FUZZ_DIRECTORY/infra/helper.py" reproduce "$PROJECT_NAME" ical_fuzzer "$testcase" | tee "$OUTPUT"
|
||||
if [ $PIPESTATUS -eq 0 ]
|
||||
then
|
||||
echo "### Testcase fixed! $testcase"
|
||||
continue
|
||||
fi
|
||||
echo "### Testcase reproduced! $testcase"
|
||||
TEST_FILE_CONTENT="`cat \"$OUTPUT\" | sed -n '/--- start calendar ---/,/--- end calendar ---/{/--- start calendar ---/b;/--- end calendar ---/b;p}'`"
|
||||
if [ -z "$TEST_FILE_CONTENT" ]
|
||||
then
|
||||
echo "### No test file content for $testcase"
|
||||
exit 1
|
||||
fi
|
||||
ICS_FILE="$PYTHON_TEST_CASE_DIRECTORY/`basename \"$testcase\"`.ics"
|
||||
# decode and ignore garbage, see https://stackoverflow.com/a/15490765/1320237
|
||||
echo $TEST_FILE_CONTENT | base64 -di > /dev/null
|
||||
echo "Created $ICS_FILE"
|
||||
done
|
||||
@@ -0,0 +1,12 @@
|
||||
"""This test tests all fuzzed calendars."""
|
||||
|
||||
import icalendar
|
||||
from icalendar.tests.fuzzed import fuzz_calendar_v1
|
||||
|
||||
|
||||
def test_fuzz_v1(fuzz_v1_calendar):
|
||||
"""Test a calendar."""
|
||||
with open(fuzz_v1_calendar, "rb") as f:
|
||||
fuzz_calendar_v1(
|
||||
icalendar.Calendar.from_ical, f.read(), multiple=True, should_walk=True
|
||||
)
|
||||
Reference in New Issue
Block a user