Bug 748903
| Summary: | Systems advanced search: search term field too limited in length | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Sven Mueller <sven-redhat> | ||||
| Component: | WebUI | Assignee: | Tomas Lestach <tlestach> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 1.5 | CC: | slukasik | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-12-22 16:49:21 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 723481 | ||||||
| Attachments: |
|
||||||
|
Description
Sven Mueller
2011-10-25 14:30:37 UTC
Created attachment 530243 [details]
I think this would solve it (mostly)
I'm not a java programmer (but I know java syntax enough to read programs), so I got the git tree and checked the sources best I could.
I patched systemsearch.jsp (see attached patch), and found no unintended side effects. I think it would even be no problem to drop the maxlength parameter altogether.
Actually, patching this file alone didn't do anything (on the live system, without recompiling), I still get the web page with maxlength="36" for the search_string parameter.
I try to get my system to rebuild spacewalk-java, but I experience several problems installing the build dependencies.
Hey Sven, there's one more point: code/src/com/redhat/rhn/frontend/action/systems/validation/systemSearchForm.xsd that is used for input validation. So, if we would drop the maxlegth completely, you would get following validation error on webui, when entering string longer than 100chars: "Search string cannot be greater than 100 characters (Note: double byte chars are not supported)." So, I just increased the limit just to 100 chars. spacewalk.git: 2df5137ea5be18beb58f75d30864bb5f215cffb5 For the command line option, try to use system.search.* APIs. Hi Thomas. While I think 100 characters should be OK for us, I'm wondering where the limit comes from. All relevant database fields seem to be at least 128 characters in size (system names can have at least 200 characters IIRC from the SQL schema). So unless there are restrictions somewhere else, which enforce a lower limit, I would go to 128 characters at least (for both the systemSearchForm.xsd and the systemsearch.jsp files). Using arbitrarily low limits where there is no technical reason seems wrong to me, at least anywhere outside the database design. Anyhow: Thanks a lot for taking on this bug so quickly. One question though: Will this be in Spacewalk 1.6? Regards, Sven Spacewalk 1.6 has been released. |