• Heiko Kramer
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi guys,

we have a finding from a penetration test .. a customer community user could flood our production queues with auto-generated cases by capturing the case-opening link and re-send it over and over again.

The tester's recommendation is to limit the ammount of cases which can be created by a user OR to use a capture when a certain amount of cases has been opened in a certain time.

Where to start with this?
Where/How would I implement such a limit / capture?
Case trigger?
Is there any way to manage this declarative in setup?
Does anyone know a good example article / blogpost on this topic?

Thanks and regards,
Heiko
// Map to keep key (caregory) and value related to each other
        Map<String, String> mailValues = new Map<String, String>();
        
        // Seperate keys and values and put it in the map 
       	List<String> listOfLines = plainText.split('\n');
        for(String line : listOfLines){
            String key   = line.substringBetween('<', '>');
            String value = line.substringBetween('<' + key + '>', '</' + key + '>');
            
            if (key != null) {                                    // this works just fine, null key not added 

            // if (key != null || value != null){           // works partial, null key not added, but empty value added
            //  if (key != null || value != ''){              // doesn't work at all, null key + empty value get added 

                mailValues.put(key, value);                
            }
Hi guys, I'm getting tagged values per mail in this format:

<key>value</key>
<key2>value</key2>

Somethimes there are linebreaks, so I get a null key added to the map. Got that solved with "key != null".

But I'm struggling with excluding no-values like <key></key>.
Probably easy, but I'm absulte beginner … can someone give me a hand here?
 
// Map to keep key (caregory) and value related to each other
        Map<String, String> mailValues = new Map<String, String>();
        
        // Seperate keys and values and put it in the map 
       	List<String> listOfLines = plainText.split('\n');
        for(String line : listOfLines){
            String key   = line.substringBetween('<', '>');
            String value = line.substringBetween('<' + key + '>', '</' + key + '>');
            
            if (key != null) {                                    // this works just fine, null key not added 

            // if (key != null || value != null){           // works partial, null key not added, but empty value added
            //  if (key != null || value != ''){              // doesn't work at all, null key + empty value get added 

                mailValues.put(key, value);                
            }
Hi guys, I'm getting tagged values per mail in this format:

<key>value</key>
<key2>value</key2>

Somethimes there are linebreaks, so I get a null key added to the map. Got that solved with "key != null".

But I'm struggling with excluding no-values like <key></key>.
Probably easy, but I'm absulte beginner … can someone give me a hand here?
 
// Map to keep key (caregory) and value related to each other
        Map<String, String> mailValues = new Map<String, String>();
        
        // Seperate keys and values and put it in the map 
       	List<String> listOfLines = plainText.split('\n');
        for(String line : listOfLines){
            String key   = line.substringBetween('<', '>');
            String value = line.substringBetween('<' + key + '>', '</' + key + '>');
            
            if (key != null) {                                    // this works just fine, null key not added 

            // if (key != null || value != null){           // works partial, null key not added, but empty value added
            //  if (key != null || value != ''){              // doesn't work at all, null key + empty value get added 

                mailValues.put(key, value);                
            }
Hi guys, I'm getting tagged values per mail in this format:

<key>value</key>
<key2>value</key2>

Somethimes there are linebreaks, so I get a null key added to the map. Got that solved with "key != null".

But I'm struggling with excluding no-values like <key></key>.
Probably easy, but I'm absulte beginner … can someone give me a hand here?