Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-5368

Access warning when get resource bundle which its name starts with "label"

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 6.3.0
    • 6.7.1
    • Core
    • None

    Description

      The below:

      <s:select name="reasonOfTransactionCode" list="reasonOfTransactionList"      
      listKey="top" listValue="%{getText('label.reasonOfTransaction.'+top)}"/> 

      generates this warning for each item in the list, so if the `reasonOfTransactionList` has seven items I see this error seven time:

      ognl.SecurityMemberAccess: Access to non-public [protected java.lang.String org.apache.struts2.components.UIBean.label] is blocked!
       
      

       

      But this works fine If I  just rename resource bundle and removes `label` from its name

       

      <s:select name="reasonOfTransactionCode" list="reasonOfTransactionList"      listKey="top" listValue="%{getText('reasonOfTransaction.'+top)}"/> 

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            afattahi Alireza Fattahi

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment