Skip to content

Commit

Permalink
Merge branch 'main' into issue-OWASP-BLT#1553
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSilverio authored Dec 18, 2023
2 parents a50e1c1 + b3eeb83 commit f587a57
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 40 deletions.
30 changes: 15 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Unidecode = "^1.3.7"
user-agents = "^2.2.0"
whitenoise = "^6.6.0"
django-debug-toolbar = "^3.7.0"
selenium = "^4.15.2"
selenium = "^4.16.0"
pylibmc = "^1.6.1"
psycopg2-binary = "^2.9.9"
boto = "^2.49.0"
Expand All @@ -51,9 +51,9 @@ cffi = "^1.16.0"
django-mdeditor = "^0.1.20"
django-tz-detect = "^0.4.0"
django-tellme = "^0.7.3"
django-bootstrap-datepicker-plus = "^5.0.4"
django-bootstrap-datepicker-plus = "^5.0.5"
django-star-ratings = "^0.9.2"
stripe = "^7.7.0"
stripe = "^7.9.0"
django-environ = "^0.11.2"
django-humanize = "^0.1.2"
drf-yasg = "^1.20.0"
Expand All @@ -62,7 +62,7 @@ django-filter = "^22.1"
webdriver-manager = "^4.0.1"
pillow = "^10.1.0"
chromedriver-autoinstaller = "^0.6.3"
sentry-sdk = "^1.38.0"
sentry-sdk = "^1.39.1"

[tool.poetry.dev-dependencies]
black = "^22.3.0"
Expand Down
64 changes: 46 additions & 18 deletions website/templates/_bug.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% load gravatar %}
{% load static %}
{% load custom_tags %}

<div class="bug-container flex flex-col p-5 bg-white m-1 w-[100%] h-[290px] rounded-[2.5rem] border-[#e8e8e8] border-2">
<div class="bug-container flex flex-col p-5 bg-white m-1 w-[100%] h-[300px] rounded-[2.5rem] border-[#e8e8e8] border-2">
<div class="bug-author bg-red font-medium font-['Inter'] text-[#656565] flex flex-row items-center gap-[0.8rem]">
{% if bug.user.userprofile.avatar %}
<img src="{{ bug.user.userprofile.avatar }}" width="30" class="h-[30px] object-cover img-responsive rounded-full" loading="lazy">
Expand All @@ -14,13 +15,13 @@
<img src="{% static 'images/dummy-user.png' %}" width="30"
class="h-[30px] object-cover img-responsive rounded-full" loading="lazy">
{% endif %}
<span class="whitespace-nowrap overflow-clip"> {{bug.user}} </span>
<a href="/profile/{{bug.user.username}}" class="whitespace-nowrap overflow-clip"> {{bug.user}} </a>
<div class="bug-type bg-[#0097ED] border-[#005AAD] ms-auto me-2 border-[1px] tracking-wider px-3 py-[1px] rounded-full font-['Nunito_Sans'] font-bold text-lg text-white">
{{bug.get_label_display}}
</div>
</div>
<div class="bug-desc py-2 h-[100%] font-['Barlow'] font-medium text-[#774343] text-3xl leading-10 overflow-clip">
{{bug.description}}
<a href="/issue2/{{ bug.id }}">{{bug.description|truncatechars:100}}</a>
</div>
<div class="bug-images h-[50px] flex flex-row justify-between px-3 my-2">
{% for bug_key, bug_screenshots in bugs_screenshots.items %}
Expand All @@ -31,27 +32,54 @@
{% endif %}
{% endfor %}
</div>

<div class="bug-actions h-[45px] flex flex-row">
<svg class="scale-125 m-3" width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.46692 9.45723V18.6604" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16.0815 18.6604H7.46693H3.78564V9.4572H7.46693L12.2485 3.87867C12.7023 3.34933 13.4161 3.12177 14.0925 3.29086L14.1362 3.3018C15.3711 3.61052 15.9274 5.04941 15.2214 6.10849L12.9889 9.4572H17.1859C18.3474 9.4572 19.2186 10.5198 18.9908 11.6588L17.8864 17.1807C17.7143 18.0411 16.9589 18.6604 16.0815 18.6604Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<svg class="scale-125 m-3 ms-1" width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.06152 19.5808V13.1385V3.93531" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.06152 3.93531H18.7867L14.1851 8.53692L18.7867 13.1385H4.06152" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<button {% if not user.is_authenticated %} disabled {% endif %} onclick="like_unlike_handler(event,{{bug.id}})">
<svg id="likeSvg{{bug.id}}" class="scale-125 m-3" width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.46692 9.45723V18.6604" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M16.0815 18.6604H7.46693H3.78564V9.4572H7.46693L12.2485 3.87867C12.7023 3.34933 13.4161 3.12177 14.0925 3.29086L14.1362 3.3018C15.3711 3.61052 15.9274 5.04941 15.2214 6.10849L12.9889 9.4572H17.1859C18.3474 9.4572 19.2186 10.5198 18.9908 11.6588L17.8864 17.1807C17.7143 18.0411 16.9589 18.6604 16.0815 18.6604Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</button>
{% with user_issue_upvoted_list=bug.user.userprofile.issue_upvoted.all %}
{% if user_issue_upvoted_list and bug in user_issue_upvoted_list %}
<script>
$(document).ready(function () {
$('#likeSvg{{bug.id}}').find('path').attr('fill', '#a11010');
});
</script>
{% endif %}
{% endwith %}
<button {% if not user.is_authenticated %} disabled {% endif %} onclick="flag_unflag_handler(event,{{bug.id}})">
<svg id="flagSvg{{bug.id}}" class="scale-125 m-3 ms-1" width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.06152 19.5808V13.1385V3.93531" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.06152 3.93531H18.7867L14.1851 8.53692L18.7867 13.1385H4.06152" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
{% with user_issue_flagged_list=bug.user.userprofile.issue_flagged.all %}
{% if user_issue_flagged_list and bug in user_issue_flagged_list %}
<script>
$(document).ready(function () {
$('#flagSvg{{bug.id}}').find('path').attr('fill', '#a11010');
});
</script>
{% endif %}
{% endwith %}
<svg class="scale-125 m-3 ms-auto" width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.15" d="M4.18701 4.85562C4.18701 4.34735 4.59906 3.9353 5.10733 3.9353H17.9918C18.5001 3.9353 18.9122 4.34735 18.9122 4.85562V17.7401C18.9122 18.2484 18.5001 18.6604 17.9918 18.6604H5.10733C4.59906 18.6604 4.18701 18.2484 4.18701 17.7401V4.85562Z" fill="#8C0000" fill-opacity="0.74"/>
<path d="M17.0715 3.9353H6.02765C5.01109 3.9353 4.18701 4.75939 4.18701 5.77595V16.8198C4.18701 16.923 4.1955 17.0241 4.2118 17.1226C4.35621 17.995 5.11424 18.6604 6.02765 18.6604H17.0715C18.0881 18.6604 18.9122 17.8364 18.9122 16.8198V13.3135V5.77595C18.9122 4.75939 18.0881 3.9353 17.0715 3.9353Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10.6283 8.53688C10.6283 9.55346 9.80425 10.3775 8.78766 10.3775C7.7711 10.3775 6.94702 9.55346 6.94702 8.53688C6.94702 7.52032 7.7711 6.69624 8.78766 6.69624C9.80425 6.69624 10.6283 7.52032 10.6283 8.53688Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.21252 17.1226L7.7288 13.6063C8.35464 13.0587 9.26994 12.9987 9.96185 13.4601L10.4305 13.7724C11.0973 14.217 11.9754 14.1789 12.6013 13.6782L15.0384 11.7285C15.6596 11.2315 16.5249 11.1925 17.1853 11.6185C17.2584 11.6657 17.3236 11.7242 17.3852 11.7857L18.9129 13.3135" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<svg class="scale-125 m-3 ms-1" width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.3375 5.77593C19.3375 7.30077 18.1014 8.5369 16.5765 8.5369C15.0516 8.5369 13.8156 7.30077 13.8156 5.77593C13.8156 4.2511 15.0516 3.01497 16.5765 3.01497C18.1014 3.01497 19.3375 4.2511 19.3375 5.77593Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M8.00513 10.0626L14.1051 7.0126" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M8.29475 11.2979C8.29475 12.8227 7.05863 14.0588 5.53379 14.0588C4.00896 14.0588 2.77283 12.8227 2.77283 11.2979C2.77283 9.77298 4.00896 8.5369 5.53379 8.5369C7.05863 8.5369 8.29475 9.77298 8.29475 11.2979Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M14.1071 15.5846L8.01294 12.5375" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M19.3375 16.8198C19.3375 18.3447 18.1014 19.5808 16.5765 19.5808C15.0516 19.5808 13.8156 18.3447 13.8156 16.8198C13.8156 15.2949 15.0516 14.0588 16.5765 14.0588C18.1014 14.0588 19.3375 15.2949 19.3375 16.8198Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
</svg>
<a
target="_blank"
href="https://twitter.com/intent/tweet?text=Bug Found on @{{ bug.domain_title }} - {{ bug.description }} Report: https://{% env 'FQDN' %}/issue2/{{ bug.id }}"
class="flex items-center px-10 h-14 rounded-xl font-extrabold hover:text-red-500 hover:bg-gray-100 m-5 xl:m-0"><svg class="scale-125 m-3 ms-1" width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.3375 5.77593C19.3375 7.30077 18.1014 8.5369 16.5765 8.5369C15.0516 8.5369 13.8156 7.30077 13.8156 5.77593C13.8156 4.2511 15.0516 3.01497 16.5765 3.01497C18.1014 3.01497 19.3375 4.2511 19.3375 5.77593Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M8.00513 10.0626L14.1051 7.0126" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M8.29475 11.2979C8.29475 12.8227 7.05863 14.0588 5.53379 14.0588C4.00896 14.0588 2.77283 12.8227 2.77283 11.2979C2.77283 9.77298 4.00896 8.5369 5.53379 8.5369C7.05863 8.5369 8.29475 9.77298 8.29475 11.2979Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M14.1071 15.5846L8.01294 12.5375" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
<path d="M19.3375 16.8198C19.3375 18.3447 18.1014 19.5808 16.5765 19.5808C15.0516 19.5808 13.8156 18.3447 13.8156 16.8198C13.8156 15.2949 15.0516 14.0588 16.5765 14.0588C18.1014 14.0588 19.3375 15.2949 19.3375 16.8198Z" stroke="#8C0000" stroke-opacity="0.74" stroke-width="1.65658"/>
</svg>
</a>
</div>
</div>
35 changes: 35 additions & 0 deletions website/templates/_report_widget.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<div class="bug-container flex flex-col p-5 px-7 bg-[#FFC8C485] m-1 w-[100%] h-[300px] rounded-[2.5rem] border-[#FF545433] border-[3px]">

<form class="h-full flex flex-col gap-[0.9rem]">


<div class="font-['Barlow_Semi_Condensed'] font-semibold text-[#b10909] text-5xl text-center mb-1">REPORT AN ISSUE</div>

<input type="text" id="first_name" class="bg-white text-[#4C4C4C] placeholder:text-xl rounded-full block w-full p-[0.4rem] px-4 font-semibold outline-none" placeholder="Domain URL" required>

<select class="bg-white text-[#4C4C4C] text-2xl rounded-full block w-full p-2 px-3 font-semibold outline-none border-r-8 border-r-white cursor-pointer">
<option value="0" selected="selected">General</option>
<option value="1">Number error</option>
<option value="2">Functional</option>
<option value="3">Performance</option>
<option value="4">Security</option>
<option value="5">Typo</option>
<option value="6">Design</option>
<option value="7">Server down</option>
</select>


<div>
<label class="bg-trans text-[#303030] text-[1.4rem] rounded-full block w-full px-2 font-semibold outline-none m-0 mb-0 mt-[-2px]"> Attach Screenshots: </label>
<input type="file" id="screenshot" class="bg-white text-[#4C4C4C] text-xl rounded-lg block w-full p-2 px-2 font-semibold outline-none" multiple required>
</div>

<textarea type="text" id="first_name" class="bg-white text-[#4C4C4C] text-xl rounded-[1rem] w-full p-2 px-3 font-semibold outline-none h-full flex flex-col resize-none" placeholder="Description" required></textarea>

<div class="flex flex-row gap-[0.7rem]">
<button id="expand" class="font-['Barlow'] font-bold text-[#b10909] text-3xl text-center bg-[#FF9090] p-2 rounded-full border border-1 border-[#CB3838] w-[4rem]"><i class="fa fa-angle-down" aria-hidden="true"></i></button>
<button type="submit" class="w-full font-['Barlow'] font-bold text-[#b10909] text-3xl text-center bg-[#FF9090] p-2 rounded-full border border-1 border-[#CB3838]">SUBMIT BUG!</button>
</div>

</form>
</div>
2 changes: 1 addition & 1 deletion website/templates/base_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

</head>

<body class="relative min-h-[100vh] flex flex-col bg-[#F7F7F7] font-['Inter']">
<body class="relative min-h-[100vh] flex flex-col bg-[#F7F7F7] font-['Ubuntu']">

{% comment %} navigation {% endcomment %}
{% include "includes/header.html" %}
Expand Down
Loading

0 comments on commit f587a57

Please sign in to comment.