Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main #257

Merged
merged 143 commits into from
Dec 22, 2024
Merged

Update main #257

merged 143 commits into from
Dec 22, 2024

Conversation

in27sung
Copy link
Owner

No description provided.

USER and others added 30 commits December 13, 2024 15:26
유저컨트롤 과 나머지 DAO수정완료 -> 작업중
order 마무리 밑 admin 작업할려다가 중단
productVo 변경에 따른 order mapper 및 jsp수정
admin 파트 수정으로 인한 커밋

<script>
function changePageSize(size) {
location.href = '/order/orderList?page=1&pageSize=' + size;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.

Copilot Autofix AI about 1 month ago

To fix the problem, we need to ensure that the value taken from the DOM is properly sanitized or validated before it is used to construct the URL. The best way to fix this issue without changing existing functionality is to use a function that ensures the value is a valid number before constructing the URL. This can be done using JavaScript's parseInt function to convert the value to an integer and then checking if it is a valid number.

Suggested changeset 1
stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp b/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp
--- a/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp
+++ b/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp
@@ -84,3 +84,3 @@
    <div class="page-size-selector">
-       <select onchange="changePageSize(this.value)">
+       <select onchange="changePageSize(parseInt(this.value))">
            <option value="10" ${pageVO.cri.pageSize == 10 ? 'selected' : ''}>10개씩 보기</option>
@@ -93,2 +93,6 @@
    function changePageSize(size) {
+       if (isNaN(size) || size <= 0) {
+           alert('Invalid page size');
+           return;
+       }
        location.href = '/order/orderList?page=1&pageSize=' + size;
EOF
@@ -84,3 +84,3 @@
<div class="page-size-selector">
<select onchange="changePageSize(this.value)">
<select onchange="changePageSize(parseInt(this.value))">
<option value="10" ${pageVO.cri.pageSize == 10 ? 'selected' : ''}>10개씩 보기</option>
@@ -93,2 +93,6 @@
function changePageSize(size) {
if (isNaN(size) || size <= 0) {
alert('Invalid page size');
return;
}
location.href = '/order/orderList?page=1&pageSize=' + size;
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<script src="<c:url value='/resources/scripts/toast.js' />"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR 코드 스캔 및 상품 정보</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-qrcode/2.2.1/html5-qrcode.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR 코드 스캔 및 상품 정보</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-qrcode/2.2.1/html5-qrcode.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR 코드 스캔 및 상품 정보</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-qrcode/2.2.1/html5-qrcode.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR 코드 스캔 및 상품 정보</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-qrcode/2.2.1/html5-qrcode.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR 코드 스캔 및 상품 정보</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-qrcode/2.2.1/html5-qrcode.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<!-- jQuery CDN 추가 -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
…sion

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@in27sung in27sung merged commit 2db030f into main Dec 22, 2024
5 checks passed
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.

6 participants