I have added # character in name, emailId and address. But when I see in hmc or backoffice , hash(#) is removed. name and emailId exist without hash.
Why hybris is not taking # character in any attribute value?
The de.hybris.platform.servicelayer.web.XSSFilter class strips the # character from the input fields. You can test it by adding the following value to your local.properties:
xss.filter.enabled=false
Once you do this, you will be able to capture data containing a # character. But since you don't want to disable XSSFilter, so the only way around it is to override the doFilter method on XSSFilter and add some logic to exclude data that would contain # character.
Also, if you are trying to save such values at other places like local.properties, then please try storing the value like below, use \\ before # symbol:
property.value=hybris\\#value
Related
I have working code using re.compile that searches for a given key and extracts specified bytes from that line.
Working cypher
S011=re.compile(r"S0\w*\W*11\b")
Searches for 'S0' at the start and '11' further in (the intervening alphanumeric changes with each file)
S012PA041 11 1001650953.34N 72627.05E 426930.97227906.7 285.3227033224
I am trying to use the same method for a different input file but I can't work out the correct mask/cypher. There are several lines starting 'P1' so that in not exclusive enough; the 'P1....,V0' is the exclusive key. Again the numbers between the keys change with each event and file.
P1,0,01169-72-063,,1001,,1,2020:07:31:12:48:01.7,1,V01,2,,436389.57,7196330.69,,64.88354429,7.65691702,,64.88327349,7.65520631,,0.00,0.00,0.00,0.00,,248.04
I have tried these but with no success:
V0=re.compile(r"^P1\w*\W*V0")
V0=re.compile(r"^P1\w*\W*V0\w*\W*")
V0=re.compile(r"^P1\w*V0\w*")
After running more combinations than an safe-cracker on Red Bull, I've finally got the right sequence for the regex.
Line to be identified using 'P1' and further in 'V01' as search keys
P1,0,01169-72-063,,1001,,1,2020:07:31:12:48:01.7,1,V01,2,,436389.57,7196330.69,,64.88354429,7.65691702,,64.88327349,7.65520631,,0.00,0.00,0.00,0.00,,248.04
re.compile code to identify it.
V0=re.compile(r"^P1\s*,*:*\S*V01\s*,*:*\S*\b")
*When i run my robot tests it says Multiple keywords with name 'Set
Variable Value for' found. Give the full name of the keyword you want to use:
step_definitions.Set Variable Value for
variable_handler.Set Variable Value for
It does this for all the keywords mentioned in variable_handler.py
Is there something that i am missing? Do we need to give the name
of python file that has that keyword?*
found not much online. have added the library in the settings.
Variable_handler.py
```#keyword(name='Set Variable Value for')
def Set_Variable_Value_for(tag, value):
my_token_file = 'Resources/written_variables.yml'
data = None
with open(my_token_file, 'r') as testData:
data = yaml.load(testData)
data[tag] = value
with open(my_token_file, 'w') as writeTestData:
print(ruamel.yaml.dump(data, writeTestData,
Dumper=ruamel.yaml.RoundTripDumper))```
step_definitions.py
'''#keyword(name='Set Start Time for Test')
def Test_Start_Time():
tz = timezone('UTC')
Time_Now = datetime.now(tz)
naive_date = Time_Now.replace(tzinfo=None)
Set_Variable_Value_for('START_TIME', naive_date)```
Test.robot
'''Create a New Member
[Documentation] Add a New Member
[Tags] CreateMember MemberAndProjectCreationFlow SanityTest
All
Login to Platform Analytics
Verify Member List Page Elements
Click on Add Member
Add Member Breadcrumb is displayed
Add New Member Details
Verify New Member Creation
Search for the Member ${NEW_MEMBER_NAME_GLOBAL}
Search the Results and Go To ${NEW_MEMBER_NAME_GLOBAL}
${Member_Row_Locator} ${Member_Column}
${MEMBER_HOMEPAGE} = Replace String ${MEMBER_HOME}
MEMBERHOME ${NEW_MEMBER_SCHEMA_GLOBAL}
Set Global Variable ${MEMBER_HOMEPAGE_GLOBAL}
${MEMBER_HOMEPAGE}
🚩Set Variable Value for MEMBER_HOMEPAGE ${MEMBER_HOMEPAGE}
Log To Console Member Creation Successful.```
It should work without specifying the python file that contains
the key word. I have imported all the things required like variable_handler and step definitions
The root of the matter is that you have two or more keywords with the same name imported into the test. When you try to run the keyword Set Variable Value for, robot doesn't know which of the keywords to run. It has no way of knowing if the two names represent two different functions or the same function in two different libraries.
You have three possible solutions:
As the error suggests, you can specify the full path to the keyword, such as step_definitions.Set Variable Value
You tell robot to give precedence to one library over the other using the built-in keyword Set Library Search Order.
You can modify your libraries so that you don't have duplicate keyword names
For more information see Handling keywords with same names in the robot framework user guide.
Unfortunately we have a special folder named "_archive" in our repository everywhere.
This folder has its purpose. But: When searching for content/documents we want to exclude it and every content beneath "_archive".
So, what i want is to exclude the path and its member from all user searches. Syntax is easy with fts:
your_query AND -PATH:"//cm:_archive//*"
to test:
https://www.docdroid.net/RmKj9gB/search-test.pdf.html
take the pdf, put it into your repo twice:
/some_random_path/search-test.pdf
/some_random_path/_archive/search-test.pdf
In node-browser everything works as expected:
TEXT:"HODOR" AND -PATH:"//cm:_archive//*"
= 1 result
TEXT:"HODOR"
= 2 results
So, my idea was to edit search.get.config.xml and add the exclusion to the list of properties:
<search>
<default-operator>AND</default-operator>
<default-query-template>%(cm:name cm:title cm:description ia:whatEvent
ia:descriptionEvent lnk:title lnk:description TEXT TAG) AND -PATH:"//cm:_archive//*"
</default-query-template>
</search>
But it does not work as intended! As soon as i am using 'text:' or 'name:' in the search field, the exclusion seems to be ignored.
What other option do i have? Basically just want to add the exclusion to the base query after the default query template is used.
Version is Alfresco Community 5.0.d
thanks!
I guess you're mistaken what query templates are meant for. Take a look at the Wiki.
So what you're basically doing is programmatically saying I've got a keyword and I want to match the keywords to the following metadata fields.
Default it will match cm:name cm:title cm:description etc. This can be changed to a custom field or in other cases to ALL.
So putting an extra AND or here of whatever won't work, cause this isn't the actual query which will be built. I can go on more about the query templates, but that won't do you any good.
In your case you'll need to modify the search.get webscript of Alfresco and the method called function getSearchResults(params) in search.lib.js (which get's imported).
Somewhere in at the end of the method it will do the following:
ftsQuery = '(' + ftsQuery + ') AND -TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating" AND -TYPE:"st:site"' + ' AND -ASPECT:"st:siteContainer" AND -ASPECT:"sys:hidden" AND -cm:creator:system AND -QNAME:comment\\-*';
Just add your path to query to it and that will do.
Hi when I try to download a file from mainframe, using attachmate extra it appends the username also along with it. I dont know where to turn it off.
like for example - file name is yyyy.file.name, then when i try to transfer of file it transfers username.yyyy.file.name.
in 3.4 the option to append user name is turned off. Still its happening
Enclose the entire dataset name (including the high-level qualifier) in single quotes. This is a TSO (not JCL) convention - if you refer to a dataset without single quotes, it pre-pends your user ID as the high-level qualifier; however if you place single quotes around the dataset name it will take it 'as is' (well, it will uppercase it, since all z/OS dataset names are uppercase, but otherwise it will be 'as is').
I wanted to add things such as Size, BuildHost, BuildDate etc in rpm query but adding this thing in spec file results in unknown tag?? How can I do this so that these things are reflected when i give the rpm query command?
These tags are determined when the package is built; they cannot be forced to specific values.
For example BuildHost is hardcoded in rpmbuild and cannot be changed. There is RFE https://bugzilla.redhat.com/show_bug.cgi?id=1309367 to allow it modify from command line. But right now you cannot change it by any tag in spec file nor by passing some option on command line to rpmbuild.
I assume it will be very similar to other values you specified.
RPM5 permits arbitrary unique tag names to be added to header metadata.
The tag names are configured in a colon separated list in a macro. Then the new tags can be used in spec files and can be extracted using --queryformat.
All arbitrary tags are string (or string array) valued.