Skip to content

Commit a7df847

Browse files
committed
Fail rebuild for config files containing compromised github organisation
See https://meta.discourse.org/t/plugin-repository-hijacked/374703/6
1 parent 80a2aee commit a7df847

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

launcher

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ BUNDLED_PLUGINS=(
4848
"discourse-calendar"
4949
)
5050

51+
COMPROMISED_ORGANIZATIONS=(
52+
"github.com/discoursehosting"
53+
)
54+
5155
# for potential re-exec later
5256
SAVED_ARGV=("$@")
5357

@@ -358,6 +362,18 @@ set_template_info() {
358362
arrTemplates=(${templates// / })
359363
config_data=$(cat $config_file)
360364

365+
# if config data includes any compromised organizations, error out and print a message
366+
for org in "${COMPROMISED_ORGANIZATIONS[@]}"; do
367+
if [[ $config_data =~ $org ]]; then
368+
echo "---"
369+
echo "ERROR: The configuration file $config_file contains references to a compromised github organization: $org"
370+
echo "Please remove any references to this organization from your configuration file."
371+
echo "For more information, see https://meta.discourse.org/t/374703/6"
372+
echo "---"
373+
exit 1
374+
fi
375+
done
376+
361377
input="hack: true"
362378

363379
for template in "${arrTemplates[@]}"

0 commit comments

Comments
 (0)