Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions src/org/labkey/test/pages/core/admin/CustomizeSitePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ public CustomizeSitePage setMaxBLOBSize(String value)
return this;
}

public CustomizeSitePage setReadOnlyHttpRequestTimeout(String value)
{
elementCache().readOnlyHttpRequestTimeout.set(value);
return this;
}

public CustomizeSitePage setExt3Required(boolean enable)
{
elementCache().ext3Required.set(enable);
Expand Down Expand Up @@ -247,6 +253,7 @@ protected RadioButton exceptionReportingLevel(ReportingLevel level)
// System Properties
protected final Input memoryUsageDumpInterval = Input(Locator.id("memoryUsageDumpInterval"), getDriver()).findWhenNeeded(this);
protected final Input maxBLOBSize = Input(Locator.id("maxBLOBSize"), getDriver()).findWhenNeeded(this);
protected final Input readOnlyHttpRequestTimeout = Input(Locator.id("readOnlyHttpRequestTimeout"), getDriver()).findWhenNeeded(this);
protected final Checkbox ext3Required = Checkbox(Locator.id("ext3Required")).findWhenNeeded(this);
protected final Checkbox ext3APIRequired = Checkbox(Locator.id("ext3APIRequired")).findWhenNeeded(this);

Expand Down
27 changes: 27 additions & 0 deletions src/org/labkey/test/tests/AdminConsoleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,33 @@ private String getServerHeader()
throw new RuntimeException("Failed to get Server HTTP response header", e);
}
}

@Test
public void testBogusSiteSettings()
{
// Issue 53562: Cap max BLOB size
CustomizeSitePage customizeSitePage = goToAdminConsole().clickSiteSettings();
customizeSitePage.setMaxBLOBSize(Integer.toString(200 * 1024 * 1024 + 1));
customizeSitePage.setSslPort("-4");
customizeSitePage.setMemoryUsageDumpInterval("-3");
customizeSitePage.setReadOnlyHttpRequestTimeout("-1");
customizeSitePage.save();
assertTextPresent(
"Maximum BLOB size cannot be set higher than 209715200 bytes",
"HTTPS port must be between 1 and 65,535",
"Memory logging frequency must be non-negative",
"HTTP timeout must be non-negative"
);

customizeSitePage = new CustomizeSitePage(getDriver());
customizeSitePage.setMaxBLOBSize("-10");
customizeSitePage.setSslPort(Integer.toString(256 * 256)); // 2^16
customizeSitePage.save();
assertTextPresent(
"Maximum BLOB size cannot be negative",
"HTTPS port must be between 1 and 65,535"
);
}

@Test
public void testRibbonBar()
Expand Down