- Products
- Learn
- Local User Groups
- Partners
- More
Access Control and Threat Prevention Best Practices
5 November @ 5pm CET / 11am ET
Firewall Uptime, Reimagined
How AIOps Simplifies Operations and Prevents Outages
Overlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Spark Management Portal and More!
Hello,
One SmartTask's script which used to work on the version R81.10, is not working correctly in the R81.20
It is about the script to run before publishing that will force to write a session name with more than 20 characters :
#!/bin/bash
namelen=`echo $1 | base64 -id | jq -r .session.\"session-name\" | wc -c`
if [[ $namelen -le 20 ]]; then
printf '{"result":"failure","message":"Session name should be at least 20 characters"}\n'
exit 0
else
printf '{"result":"success"}\n'
exit 0
fi
So everything looks right when I write a session name of less than 20 characters. I will use the default session name :
As usual, the publish operation failed :
Then, I wrote a session name of more than 20 characters :
Surprise. I got the same error :
I tested the same in a R81.10 and the result with a session name of more than 20 characters, was the spected one :
It looks like there is a bug on the R81.20 version
I will try to update the SMS with the last jumbo.
If you have no news, it means that the update did not work.
Have a nice end of the day
Miguel
You didn't get what I wanted you to test with my SmartTask examples.
Step1: Please go to this SmartTask and try if it works for you
Step2: If step 1 works as expected, please change "session-description" to "session-name" and adjust the message accordingly. Test again and tell us your result.
My unaltered script won't work to verify your demand for session name length verification.
@patones1 wrote:
- I load your script,"Session-Description", in the Script Repository.
- I create the smartTask "Session-Description"
- I publish the smartTask operation.
- I make a change on a policy and I publish with a session name of less than 20 characters
You need to adjust it first as in this example:
test `cat $1|jq -r .session.\"session-name\"|wc -c` -le 20 && echo '{"result":"failure","message":"Session name should be at least 20 characters"}' || echo '{"result":"success"}'
Is this for one of the CCSE class lab exercises?
It is the script of the CCSE lab. The good one.
I wonder if they have change it for the R81.20
I just tried it in R81.20 lab and it was exact same issue as you described.
Andy
It looks like is the second part of the script that R81.20 doesn't see :
else
printf '{"result":"success"}\n'
I can try this in my R81.20 jumbo 10 lab tomorrow. So you just added new smart task to run this script, thats it?
Andy
Yes. It needs to be run twice.
Once with a session name of less than 20 characters. (it will work)
And then with more than 20 characters. (I hope that with the Jumbo10, it will be able to publish).
That's normal and expected behaviour.
The first publish simply activates your SmartTask, not matter what is configured to perform.
Afterwards the SmartTask is ready for use.
SmartTask examples
The first publish simply activates your SmartTask ....
This is obvious. My testing is after activating the SmartTask by publishing first.
Then I make changes and publish each change (once with session name of less than 20 characters and the other with more than 20)
You didn't get what I wanted you to test with my SmartTask examples.
Step1: Please go to this SmartTask and try if it works for you
Step2: If step 1 works as expected, please change "session-description" to "session-name" and adjust the message accordingly. Test again and tell us your result.
I just verified and works in R81.20...amazing work as always @Danny 🙌🙌
Thx, please comment this in the SmartTask as well.
Just did.
Hello Champion,
I had tried your script before writing my post. It worked for the session description of less than 20 characters. But when entering a session name with more than 20 characters, the results were same that when using my script
My unaltered script won't work to verify your demand for session name length verification.
@patones1 wrote:
- I load your script,"Session-Description", in the Script Repository.
- I create the smartTask "Session-Description"
- I publish the smartTask operation.
- I make a change on a policy and I publish with a session name of less than 20 characters
You need to adjust it first as in this example:
test `cat $1|jq -r .session.\"session-name\"|wc -c` -le 20 && echo '{"result":"failure","message":"Session name should be at least 20 characters"}' || echo '{"result":"success"}'
Hello Danny,
Yes, you are right. I was testing too fast without modifying the script.
The script works perfectly. When I write a session name of more than 20 characters, It executes the result:"success" as it should do.
Thanks a lot and sorry for the misunderstanding.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 29 | |
| 15 | |
| 14 | |
| 13 | |
| 7 | |
| 7 | |
| 5 | |
| 5 | |
| 4 | |
| 4 |
Wed 05 Nov 2025 @ 11:00 AM (EST)
TechTalk: Access Control and Threat Prevention Best PracticesThu 06 Nov 2025 @ 10:00 AM (CET)
CheckMates Live BeLux: Get to Know Veriti – What It Is, What It Does, and Why It MattersTue 11 Nov 2025 @ 05:00 PM (CET)
Hacking LLM Applications: latest research and insights from our LLM pen testing projects - AMERTue 11 Nov 2025 @ 10:00 AM (CST)
Hacking LLM Applications: latest research and insights from our LLM pen testing projects - EMEAAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY