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

fix: [JENKINS-74173][JENKINS-74174][JENKINS-74175] Address CSP violations #234

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
[JENKINS-74175] Migrate legacy checkUrl in `AndroidEmulator/config.…
…jelly`
  • Loading branch information
yaroslavafenkin committed Dec 31, 2024
commit db31eade28d8f067859ea665b30f3fa7e002409b
Original file line number Diff line number Diff line change
Expand Up @@ -1029,8 +1029,8 @@
}

public FormValidation doCheckScreenResolution(@QueryParameter String value,
@QueryParameter String density, @QueryParameter String osVersion) {
return doCheckScreenResolution(value, density, osVersion, true).getFormValidation();
@QueryParameter String screenDensity, @QueryParameter String osVersion) {
return doCheckScreenResolution(value, screenDensity, osVersion, true).getFormValidation();

Check warning on line 1033 in src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 1033 is not covered by tests
}

private ValidationResult doCheckScreenResolution(String resolution, String density,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
help="/plugin/android-emulator/help-emulatorNamed.html">
<f:nested>
<f:entry title="${%AVD name}" field="avdName" description="${%Enter the name of an existing Android emulator configuration}">
<f:textbox checkUrl="'descriptorByName/AndroidEmulator/checkAvdName?value='+escape(this.value)"/>
<f:textbox checkUrl="descriptorByName/AndroidEmulator/checkAvdName" checkDependsOn=""/>
</f:entry>
</f:nested>
</f:radioBlock>
Expand All @@ -18,37 +18,35 @@
<f:entry title="${%Android OS version}" help="/plugin/android-emulator/help-osVersion.html">
<f:editableComboBox id="android-emulator.osVersion" field="osVersion"
items="${descriptor.androidVersions}"
checkUrl="'descriptorByName/AndroidEmulator/checkOsVersion?value='+escape(this.value)" />
checkUrl="descriptorByName/AndroidEmulator/checkOsVersion" checkDependsOn="" />
</f:entry>
<f:entry title="${%Screen density}" help="/plugin/android-emulator/help-screenDensity.html">
<f:editableComboBox name="android-emulator.screenDensity" field="screenDensity"
<f:editableComboBox id="android-emulator.screenDensity" field="screenDensity"
items="${descriptor.deviceDensities}"
checkUrl="'descriptorByName/AndroidEmulator/checkScreenDensity?value='+escape(this.value)" />
checkUrl="descriptorByName/AndroidEmulator/checkScreenDensity" checkDependsOn="" />
</f:entry>
<f:entry title="${%Screen resolution}" help="/plugin/android-emulator/help-screenResolution.html">
<f:editableComboBox id="android-emulator.screenResolution" field="screenResolution"
items="${descriptor.deviceResolutions}"
checkUrl="'descriptorByName/AndroidEmulator/checkScreenResolution?value='+ escape(this.value)
+'&amp;density='+ escape(findMatchingFormInput(this,'android-emulator.screenDensity').value)
+'&amp;osVersion='+ escape(document.getElementById('android-emulator.osVersion').value)" />
checkUrl="descriptorByName/AndroidEmulator/checkScreenResolution" checkDependsOn="osVersion screenDensity"/>
</f:entry>
<f:entry title="${%Device Definition}" help="/plugin/android-emulator/help-deviceDefinition.html">
<f:textbox name="android-emulator.deviceDefinition" value="${instance.deviceDefinition}" style="width:6em"
checkUrl="'descriptorByName/AndroidEmulator/checkDeviceDefinition?value='+escape(this.value)" />
checkUrl="descriptorByName/AndroidEmulator/checkDeviceDefinition" checkDependsOn=""/>
</f:entry>
<f:entry title="${%Device locale}" help="/plugin/android-emulator/help-deviceLocale.html">
<f:editableComboBox id="android-emulator.deviceLocale" field="deviceLocale"
items="${descriptor.emulatorLocales}"
checkUrl="'descriptorByName/AndroidEmulator/checkDeviceLocale?value='+escape(this.value)" />
checkUrl="descriptorByName/AndroidEmulator/checkDeviceLocale" checkDependsOn=""/>
</f:entry>
<f:entry title="${%SD card size}" help="/plugin/android-emulator/help-sdCard.html">
<f:textbox name="android-emulator.sdCardSize" value="${instance.sdCardSize}" style="width:6em"
checkUrl="'descriptorByName/AndroidEmulator/checkSdCardSize?value='+escape(this.value)" />
checkUrl="descriptorByName/AndroidEmulator/checkSdCardSize" checkDependsOn=""/>
</f:entry>
<f:entry title="${%Target ABI}" help="/plugin/android-emulator/help-targetAbi.html">
<f:editableComboBox id="android-emulator.targetAbi" field="targetAbi"
items="${descriptor.targetAbis}"
checkUrl="'descriptorByName/AndroidEmulator/checkTargetAbi?value='+escape(this.value)" />
checkUrl="descriptorByName/AndroidEmulator/checkTargetAbi" checkDependsOn="" />
</f:entry>
<f:entry title="${%Emulator name suffix}" help="/plugin/android-emulator/help-avdNameSuffix.html">
<f:textbox name="android-emulator.avdNameSuffix" value="${instance.avdNameSuffix}" style="width:12em" />
Expand Down Expand Up @@ -109,7 +107,7 @@
<f:textbox />
</f:entry>
<f:entry title="${%Emulator executable}" field="executable">
<f:editableComboBox items="${descriptor.executables}" checkUrl="'descriptorByName/AndroidEmulator/checkExecutable?value='+escape(this.value)" />
<f:editableComboBox items="${descriptor.executables}" checkUrl="descriptorByName/AndroidEmulator/checkExecutable" checkDependsOn="" />
</f:entry>
</f:advanced>
</f:section>
Expand Down
Loading