Skip to content

Commit 04c67fb

Browse files
committed
Fixes for CodeQL
1 parent aede8bd commit 04c67fb

File tree

4 files changed

+45
-9
lines changed

4 files changed

+45
-9
lines changed

.github/workflows/push-master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255

256256
analyze:
257257
name: Analyze (CodeQL)
258-
runs-on: ubuntu-24.04
258+
runs-on: ubuntu-latest
259259
if: ${{ vars.USE_CODEQL == 'true' && vars.USE_CODEQL || false }}
260260

261261
permissions:
@@ -288,7 +288,7 @@ jobs:
288288
clang-tidy-clazy:
289289
name: Analyze (clang and clazy)
290290
runs-on: ubuntu-latest
291-
if: ${{ vars.USE_CODEQL == 'true' && vars.USE_CODEQL || false }}
291+
if: ${{ vars.USE_CODEQL == 'true' && vars.USE_CODEQL && false || false }}
292292

293293
permissions:
294294
contents: read

CODE_OF_CONDUCT.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Code of Conduct & Project Rules
2+
3+
## 1. Professional Expectations
4+
This is a free, open-source project maintained by volunteers in their spare time. To keep the project sustainable, we require all participants to adhere to basic professional etiquette:
5+
* **Start with a greeting.** A simple "hello" goes a long way.
6+
* **No demanding attitudes.** We do not have an SLA. Do not use terms like "URGENT", "ASAP", or "CRITICAL". Such issues will be closed immediately.
7+
* **Respect our time.** If you act with entitlement, you will be ignored or banned. We are here to develop software, not to provide 24/7 personal support.
8+
9+
## 2. Hardware Compatibility & Support
10+
We provide a list of recommended hardware and verified LED drivers for a reason: [Wiki](https://github.com/awawa-dev/HyperHDR/wiki).
11+
* **Unsupported Hardware:** If you choose to use hardware or drivers outside of our recommended specifications, you are responsible for your own troubleshooting.
12+
* **Testing Constraints:** We can only diagnose problems that can be reproduced on our verified test environments. If we don't own your specific hardware, usually we cannot help you.
13+
* **"Won't Fix":** Issues caused by ignoring hardware recommendations will be closed as "Unsupported".
14+
15+
## 3. Policy on AI-Generated Content
16+
Do NOT post solutions, configurations, or "bug reports" generated by AI (ChatGPT, Claude, etc.).
17+
* **No Hallucinations:** AI models frequently hallucinate details about this project that do not exist.
18+
* **Verification:** If you bring AI-generated "advice" here and treat it as a fact over our documentation or the maintainers' advice, the conversation will be terminated. We will not spend time debunking AI-generated nonsense.
19+
20+
## 4. Technical Requirements for Support
21+
We cannot help if we are missing data. If your report lacks the following, it will be closed without investigation:
22+
* **Detailed Environment:** Full hardware and software configuration.
23+
* **Complete Logs:** We require the **WHOLE log**, not just snippets you deem "relevant".
24+
* **Visuals:** Screenshots of the **video live preview** are mandatory for any LED rendering issues.
25+
* **Reproducibility:** Clear, step-by-step instructions to reproduce the issue on recommended hardware.
26+
27+
## 5. Search Before You Ask
28+
Most questions are already answered in our [Wiki](https://github.com/awawa-dev/HyperHDR/wiki) and [Discussions](https://github.com/awawa-dev/HyperHDR/discussions).
29+
30+
## Consequences
31+
To maintain a productive environment, we reserve the right to:
32+
1. **Close** any issue or PR that violates these rules.
33+
2. **Lock** discussions that become unproductive or demanding.
34+
3. **Ban** users who demonstrate a pattern of entitlement, laziness, or disrespect.
35+
36+
**By participating in this project, you acknowledge these rules. If you disagree with this approach, feel free to fork the code and maintain it according to your own standards.**

www/js/LedSetups/SetupPhilipsHue.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function checkHueBridge(cb, hueUser)
165165
{
166166
useV2Api=parseInt(json.swversion)>1948086000&&useV2ApiConfig
167167
conf_editor.getEditor("root.specificOptions.output").setValue(hueIPs[hueIPsinc].internalipaddress);
168-
$('#wiz_hue_discovered').html("Bridge: " + json.name + ", Modelid: " + json.modelid + ", API-Version: " + json.apiversion);
168+
$('#wiz_hue_discovered').html(DOMPurify.sanitize(`Bridge: ${json.name}, Modelid: ${json.modelid}, API-Version: ${json.apiversion}`));
169169
cb(true);
170170
}
171171
else
@@ -604,7 +604,7 @@ function get_hue_groups()
604604
groupIDs={};
605605
for (const group of r.data) {
606606
groupIDs[group.id] = group;
607-
$('.gidsb').append(createTableRowFlex([group.name + '<br> (' + group.id + ')', '<button class="btn btn-sm btn-primary" onClick=useGroupId("' + group.id + '")>' + $.i18n(useV2Api?'wiz_hue_e_use_entertainmentconfigurationid':'wiz_hue_e_use_groupid', group.id) + '</button>']));
607+
$('.gidsb').append(createTableRowFlex([DOMPurify.sanitize(`${group.name}<br> (${group.id})`), '<button class="btn btn-sm btn-primary" onClick=\'useGroupId(' + JSON.stringify(DOMPurify.sanitize(group.id)) + ')\'>' + $.i18n(useV2Api?'wiz_hue_e_use_entertainmentconfigurationid':'wiz_hue_e_use_groupid', group.id) + '</button>']));
608608
gC++;
609609
}
610610
if (gC == 0)
@@ -636,7 +636,7 @@ function get_hue_groups()
636636
{
637637
if (r[groupid].type == 'Entertainment')
638638
{
639-
$('.gidsb').append(createTableRowFlex([groupid + ' (' + r[groupid].name + ')', '<button class="btn btn-sm btn-primary" onClick=useGroupId(' + groupid + ')>' + $.i18n('wiz_hue_e_use_groupid', groupid) + '</button>']));
639+
$('.gidsb').append(createTableRowFlex([DOMPurify.sanitize(`${groupid} (${r[groupid].name})`), '<button class="btn btn-sm btn-primary" onClick=\'useGroupId(' + JSON.stringify(groupid) + ')\'>' + $.i18n('wiz_hue_e_use_groupid', groupid) + '</button>']));
640640
gC++;
641641
}
642642
}
@@ -755,7 +755,7 @@ function get_hue_lights()
755755
let ipVal = encodeURI($("#ip").val());
756756
let userVal = encodeURI($("#user").val());
757757
let buttonLightLink = `<button class="btn btn-sm btn-primary" onClick=identify_hue_device("${ipVal}","${userVal}",${lightid})>***${$.i18n(useV2Api?'wiz_hue_identify':'wiz_hue_blinkblue', lightid)}</button>`;
758-
$('.lidsb').append(createTableRowFlex([`${lightid} (${descLightVal})`, selectLightControl, buttonLightLink]));
758+
$('.lidsb').append(createTableRowFlex([DOMPurify.sanitize(`${lightid} (${descLightVal})`), selectLightControl, buttonLightLink]));
759759
}
760760

761761
if (hueType != 'philipshueentertainment')

www/js/grabber.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,20 @@ $(document).ready( function(){
107107
firstMes = firstMes.replace("<m_odel>", backup.info.model).replace("<q_uality>", backup.info.quality);
108108
secondMes = secondMes.replace("<sdrStat>", backup.info.sdrStat).replace("<sdrPoint>", backup.info.sdrPoint).replace("<hdrStat>", backup.info.hdrStat).replace("<hdrPoint>", backup.info.hdrPoint);
109109

110-
$('#live_calibration_summary').html(firstMes + " "+secondMes);
110+
$('#live_calibration_summary').html(DOMPurify.sanitize(`${firstMes} ${secondMes}`));
111111
$('#wizp2').toggle(false);
112112
$('#wizp3').toggle(true);
113113
}
114114
else
115115
{
116-
$('#live_calibration_log').html(backup.info.status.
116+
$('#live_calibration_log').html(DOMPurify.sanitize(backup.info.status.
117117
replace("Processing SDR frames:", $.i18n("edt_conf_stream_wizard_calibrating_message_SDR")).
118118
replace("Processing HDR frames:", $.i18n("edt_conf_stream_wizard_calibrating_message_HDR")).
119119
replace("Waiting for the first SDR frame", $.i18n("edt_conf_stream_wizard_calibrating_message_waiting")).
120120
replace("Preparing for capturing SDR frame", $.i18n("edt_conf_stream_wizard_calibrating_message_prepare_SDR")).
121121
replace("Preparing for capturing HDR frame", $.i18n("edt_conf_stream_wizard_calibrating_message_prepare_HDR")).
122122
replace("Waiting for first HDR frame", $.i18n("edt_conf_stream_wizard_calibrating_message_waiting_first_HDR"))
123-
);
123+
));
124124
}
125125
}
126126

0 commit comments

Comments
 (0)