Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix={{branch}}-
type=sha,prefix={{branch}}-,enable=${{ github.event_name == 'push' }}
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push Docker image
Expand Down
15 changes: 13 additions & 2 deletions app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,20 @@ def test_connection():
user_message = "Connection test failed. Please check your details and try again or contact support."
return jsonify({'success': False, 'message': user_message})

# Only allow pre-approved success messages to be sent back to the user
allowed_success_prefixes = [
"Successfully connected",
"Connected, but domain",
"Connected, but domain",
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate entry in the allowed_success_prefixes list. This appears to be a copy-paste error and should be removed or corrected to the intended prefix.

Suggested change
"Connected, but domain",

Copilot uses AI. Check for mistakes.
]
user_message = "Successfully connected to DirectAdmin."
for prefix in allowed_success_prefixes:
if message.startswith(prefix):
user_message = message
break
result = {
'success': success,
'message': message
'success': True,
'message': user_message
}
print(f"Sending response: {result}")
return jsonify(result)
Expand Down