Skip to content

Patch 1#73

Open
nandasiri413-byte wants to merge 32 commits intodmdhrumilmistry:mainfrom
nandasiri413-byte:patch-1
Open

Patch 1#73
nandasiri413-byte wants to merge 32 commits intodmdhrumilmistry:mainfrom
nandasiri413-byte:patch-1

Conversation

@nandasiri413-byte
Copy link
Copy Markdown

<title>Google වැනි ලොගින් පිටුව</title> <style> body { font-family: Arial, sans-serif; background-color: #f5f5f5; display: flex; justify-content: center; align-items: center; height: 100vh; } .login-container { background-color: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); width: 320px; } h2 { text-align: center; color: #202124; } input[type="email"], input[type="password"] { width: 100%; padding: 12px 10px; margin: 8px 0; border: 1px solid #dadce0; border-radius: 4px; box-sizing: border-box; } button { width: 100%; background-color: #1a73e8; color: white; padding: 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; } button:hover { background-color: #1558b0; } </style>

Sign in

Next
<script> const loginForm = document.getElementById('loginForm'); loginForm.addEventListener('submit', function(event) { event.preventDefault(); // Prevent form from submitting normally const email = document.getElementById('email').value; const password = document.getElementById('password').value; // For demonstration, show in console console.log("Email: ", email); console.log("Password: ", password); alert('Thank you! Your details have been captured.'); // Here you can add AJAX code to send these details to your server }); </script>

dependabot Bot and others added 30 commits August 8, 2024 06:54
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.7 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.0.7...2.2.2)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/urllib3-2.2.2

Bump urllib3 from 2.0.7 to 2.2.2
Bumps [django](https://github.com/django/django) from 4.2.15 to 4.2.16.
- [Commits](django/django@4.2.15...4.2.16)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.16

Bump django from 4.2.15 to 4.2.16
Bumps [django](https://github.com/django/django) from 4.2.16 to 4.2.17.
- [Commits](django/django@4.2.16...4.2.17)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.17

Bump django from 4.2.16 to 4.2.17
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 22.0.0 to 23.0.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](benoitc/gunicorn@22.0.0...23.0.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/gunicorn-23.0.0

Bump gunicorn from 22.0.0 to 23.0.0
Bumps [django](https://github.com/django/django) from 4.2.17 to 4.2.20.
- [Commits](django/django@4.2.17...4.2.20)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.20

Bump django from 4.2.17 to 4.2.20
Bumps [django](https://github.com/django/django) from 4.2.20 to 4.2.21.
- [Commits](django/django@4.2.20...4.2.21)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 4.2.21
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.21

Bump django from 4.2.20 to 4.2.21
Bumps [django](https://github.com/django/django) from 4.2.21 to 4.2.22.
- [Commits](django/django@4.2.21...4.2.22)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 4.2.22
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.22

Bump django from 4.2.21 to 4.2.22
Bumps [requests](https://github.com/psf/requests) from 2.32.0 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.0...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/requests-2.32.4

Bump requests from 2.32.0 to 2.32.4
Bumps [django](https://github.com/django/django) from 4.2.22 to 4.2.24.
- [Commits](django/django@4.2.22...4.2.24)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 4.2.24
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.24

Bump django from 4.2.22 to 4.2.24
Bumps [django](https://github.com/django/django) from 4.2.24 to 4.2.25.
- [Commits](django/django@4.2.24...4.2.25)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 4.2.25
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.25

Bump django from 4.2.24 to 4.2.25
Bumps [django](https://github.com/django/django) from 4.2.25 to 4.2.26.
- [Commits](django/django@4.2.25...4.2.26)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 4.2.26
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/pip/django-4.2.26

Bump django from 4.2.25 to 4.2.26
bug fix when placeholder was shown even with filled in input
Enhanced docker file and changing python to python slim
Bumps [django](https://github.com/django/django) from 4.2.26 to 4.2.27.
- [Commits](django/django@4.2.26...4.2.27)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 4.2.27
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
dmdhrumilmistry and others added 2 commits December 3, 2025 22:39
…/pip/django-4.2.27

Bump django from 4.2.26 to 4.2.27
@dmdhrumilmistry
Copy link
Copy Markdown
Owner

@nandasiri413-byte can you provide more details what this patch is related to?

  • Can you also attach images for before and after the patch?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the GooglePhish phishing simulation application with CSS improvements for form label animations, dependency updates, and a modernized Docker deployment configuration. The PR description contains unrelated HTML content (a phishing login page demo) that doesn't describe the actual changes.

Key changes:

  • Modernizes the CSS selector for floating label animations from :not(input[value=""]) to :not(:placeholder-shown) for better browser compatibility
  • Updates Python dependencies (Django 4.2.15→4.2.27, gunicorn 22.0.0→23.0.0, requests 2.32.0→2.32.4, urllib3 2.0.7→2.2.2) and Poetry to v2.2.1
  • Refactors Dockerfile from basic python image to python:3.12-slim with improved structure, comments, and build optimization

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
templates/index.html Adds empty placeholder attribute to email input for CSS :placeholder-shown selector
templates/passwd.html Adds empty placeholder attribute to password input for CSS :placeholder-shown selector
static/css/styles.css Updates CSS selector from :not(input[value=""]) to input:not(:placeholder-shown) for floating label animation
pyproject.toml Bumps gunicorn to ^23.0.0 and requests to ^2.32.4
poetry.lock Updates lock file with new dependency versions and Poetry 2.2.1 format
docker-compose.yml Removes deprecated version field for Docker Compose v2+ compatibility
Dockerfile Complete rewrite with python:3.12-slim base, improved structure, better comments, and optimized build steps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread templates/index.html
<input type="text"
id="email"
name="email"
placeholder=""
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The placeholder attribute has trailing whitespace. This should be removed for consistency and cleaner code.

Suggested change
placeholder=""
placeholder=""

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
# start application
CMD [ "/poetry/bin/poetry", "run", "gunicorn", "GooglePhish.wsgi", "-b", "0.0.0.0:8000" ]
# Start the application using gunicorn
CMD ["poetry", "run", "gunicorn", "GooglePhish.wsgi:application", "-b", "0.0.0.0:8000"]
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The gunicorn application path has been changed from "GooglePhish.wsgi" to "GooglePhish.wsgi:application". While both formats can work with gunicorn, the explicit ":application" suffix is redundant since gunicorn automatically looks for an "application" callable when only the module is specified. The original format "GooglePhish.wsgi" was correct and more concise.

Suggested change
CMD ["poetry", "run", "gunicorn", "GooglePhish.wsgi:application", "-b", "0.0.0.0:8000"]
CMD ["poetry", "run", "gunicorn", "GooglePhish.wsgi", "-b", "0.0.0.0:8000"]

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
Comment on lines +47 to +48
# Make migrations and migrate database
RUN poetry run python manage.py makemigrations
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

Running makemigrations during Docker image build is not recommended. Migrations should be generated during development and committed to version control. Building an image should only run migrate to apply existing migrations. Having makemigrations in the Dockerfile can lead to inconsistent migration files across different builds.

Suggested change
# Make migrations and migrate database
RUN poetry run python manage.py makemigrations
# Migrate database

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
Comment on lines 55 to +60
ENV DJANGO_SUPERUSER_EMAIL=admin@mail.local
ENV DJANGO_SUPERUSER_USERNAME=admin
ENV DJANGO_SUPERUSER_PASSWORD=G00g13P#15#23
RUN /poetry/bin/poetry run python manage.py createsuperuser --noinput

# expose ports
# Create superuser without input prompts
RUN poetry run python manage.py createsuperuser --noinput || echo "Superuser already exists."
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

Hardcoding superuser credentials in the Dockerfile is a security risk. These credentials are baked into the Docker image and can be extracted by anyone with access to the image. Consider using Docker secrets, environment variables passed at runtime, or a startup script that creates the superuser from securely provided credentials.

Copilot uses AI. Check for mistakes.
Comment thread docker-compose.yml
@@ -1,5 +1,3 @@
version: '3'

services:
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The "version" field has been removed from docker-compose.yml. While Docker Compose v2+ no longer requires the version field and this is valid, removing it may cause compatibility issues with older Docker Compose installations (v1.x). Consider the minimum supported Docker Compose version for this project.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants